r218248 - [mips] Correct alignment of vectors passed in varargs for the O32 ABI.
Chandler Carruth
chandlerc at google.com
Mon Sep 22 11:13:11 PDT 2014
On Mon, Sep 22, 2014 at 6:27 AM, Daniel Sanders <daniel.sanders at imgtec.com>
wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=218248&view=rev
> Log:
> [mips] Correct alignment of vectors passed in varargs for the O32 ABI.
>
> Summary:
> Vectors are normally 16-byte aligned, however the O32 ABI enforces a
> maximum alignment of 8-bytes since the base of the stack is 8-byte aligned.
> Previously, this was enforced on the caller side, but not on the callee
> side.
>
This summary *sounds* like a simple correctness fix, but your test case:
> --- cfe/trunk/test/CodeGen/mips-varargs.c (added)
> +++ cfe/trunk/test/CodeGen/mips-varargs.c Mon Sep 22 08:27:06 2014
> @@ -0,0 +1,53 @@
> +// RUN: %clang -target mips-unknown-linux -O3 -S -o - -emit-llvm %s |
> FileCheck %s -check-prefix=ALL -check-prefix=O32
> +// RUN: %clang -target mips64-unknown-linux -O3 -S -o - -emit-llvm
> -mabi=n32 %s | FileCheck %s -check-prefix=ALL -check-prefix=N32
> +// RUN: %clang -target mips64-unknown-linux -O3 -S -o - -emit-llvm %s |
> FileCheck %s -check-prefix=ALL -check-prefix=N64
>
Whoa!
1) always use %clang_cc1 in test/CodeGen. Only test/Driver should use
%clang really.
2) please, please don't use -O3!!! This is *way* too coupled to the inner
details of LLVM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140922/b6c20b6e/attachment.html>
More information about the cfe-commits
mailing list