Merging r213769:
------------------------------------------------------------------------
r213769 | askrobov | 2014-07-23 18:09:26 +0100 (Wed, 23 Jul 2014) | 6 lines

Fix test/Driver/cl-x86-flags.c by providing explicit --target

This isn't very neat, but we haven't found any better ways to
make this test work with non-X86 default target.


------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@222815 91177308-0d34-0410-b5e6-96231b3b80d8
Merging r217160:

[mips] Mark aggregates returned in registers with the 'inreg' attribute.

Summary:
This allows us to easily find them in the backend after the aggregates have
been lowered to other types. This is important on big-endian targets using
the N32/N64 ABI's since these ABI's must shift small structures into the
upper bits of the register.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5005



git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@222998 91177308-0d34-0410-b5e6-96231b3b80d8
Merged from r218248:

[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 fixes the output of OpenCL's printf when given vectors.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits, pekka.jaaskelainen

Differential Revision: http://reviews.llvm.org/D5433


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@222999 91177308-0d34-0410-b5e6-96231b3b80d8
Merged from r218256:

clang/test/CodeGen/mips-varargs.c: Fixup for -Asserts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@223000 91177308-0d34-0410-b5e6-96231b3b80d8
Merged from r218260:

Fix test/CodeGen/mips-varargs.c to use %clang_cc1

Only tests under test/Driver should use %clang, and test/CodeGen in
particular must always use %clang_cc1.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@223001 91177308-0d34-0410-b5e6-96231b3b80d8
Merged from r218298:

[mips] Fix r218248's testcase to use -O1 instead of -O3.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@223002 91177308-0d34-0410-b5e6-96231b3b80d8
Merged from r220563:

[mips] Promote all integral/enumeration types to the GPR width

Summary:
Ensure all integral/enumeration types are appropriately annotated with
signext/zeroext. In particular, i32 now has these attributes when using the
N32/N64 ABI. This paves the way for accurately representing the way the
N32/N64 ABI's promotes integer arguments to i64.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: cfe-commits, theraven

Differential Revision: http://reviews.llvm.org/D5961



git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@223003 91177308-0d34-0410-b5e6-96231b3b80d8
Merged from r220566:

[mips] Mark aggregate arguments passed in registers with the inreg attribute

Summary:
This allows us to easily identify them in the backend which in turn allows us
to handle them correctly for big-endian targets (where they must be shifted
into the upper bits of the register).

Depends on D5961

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: cfe-commits, theraven

Differential Revision: http://reviews.llvm.org/D5962



git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@223004 91177308-0d34-0410-b5e6-96231b3b80d8
Merged from r222339*:
Please note that there is a significant change to the test compared to r222339.
This is because this branch generates different code compared to the trunk.
The code on this branch appears to be equivalent so the test has been updated
accordingly.
-------------------------------------------------------------------------------
Allow EmitVAArg() to promote types and use this to fix some N32/N64 vararg issues for Mips.

Summary:
With this patch, passing a va_list to another function and reading 10 int's from
it works correctly on a big-endian target.

Based on a pair of patches by David Chisnall, one of which I've reworked
for the current trunk.

Reviewers: theraven, atanasyan

Reviewed By: theraven, atanasyan

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6248



git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_35@223005 91177308-0d34-0410-b5e6-96231b3b80d8