Fix justify error for small structures in varargs for MIPS64BE
authorPetar Jovanovic <petar.jovanovic@imgtec.com>
Thu, 26 Feb 2015 18:35:15 +0000 (18:35 +0000)
committerPetar Jovanovic <petar.jovanovic@imgtec.com>
Thu, 26 Feb 2015 18:35:15 +0000 (18:35 +0000)
commite53d9df042a738d73479c5e4ac9455b4f402f62d
treedefea16405cb0f62db170167e0e8bc8b882e0f2a
parent8d4343eb9b943727450b4ead2325d8e46e3f045e
Fix justify error for small structures in varargs for MIPS64BE

There was a problem when passing structures as variable arguments.
The structures smaller than 64 bit were not left justified on MIPS64
big endian. This is now fixed by shifting the value to make it left-
justified when appropriate.

This fixes the bug http://llvm.org/bugs/show_bug.cgi?id=21608

Patch by Aleksandar Beserminji.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230657 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsCallingConv.td
test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll [new file with mode: 0644]
test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll [new file with mode: 0644]
test/CodeGen/Mips/cconv/arguments-varargs-small-structs-multiple-args.ll [new file with mode: 0644]