Fix justify error for small structures in varargs for MIPS64BE
[oota-llvm.git] / lib / Target / Mips / MipsCallingConv.td
index 90bf9f3f583511262fa202bb766be0a279e192c9..abee1851ca2a6068258f34bd76dec17a02275ef4 100644 (file)
@@ -159,6 +159,10 @@ def CC_MipsN : CallingConv<[
 // N32/64 variable arguments.
 // All arguments are passed in integer registers.
 def CC_MipsN_VarArg : CallingConv<[
+  CCIfType<[i8, i16, i32, i64],
+      CCIfSubtargetNot<"isLittle()",
+          CCIfInReg<CCPromoteToUpperBitsInType<i64>>>>,
+
   // All integers are promoted to 64-bit.
   CCIfType<[i8, i16, i32], CCPromoteToType<i64>>,