[PATCH] [MIPS] fix extension of integer types (function calls)

Daniel Sanders daniel.sanders at imgtec.com
Tue May 19 07:46:33 PDT 2015

> Also, have you tried a variant of your failing test but using varargs? This uses a different code path so we ought to check that too.

@spetrovic: I haven't seen a reply to this. Did I miss it?

Comment at: lib/CodeGen/TargetInfo.cpp:5797-5801
@@ +5796,7 @@
+bool MipsABIInfo::shouldSignExtUnsignedType(QualType Ty) const {
+  int TySize = getContext().getTypeSize(Ty);
+  if(Ty->isUnsignedIntegerOrEnumerationType() && TySize == 32)
+    return true;
+  else
+    return false;
dsanders wrote:
> Nit: Please add a comment explaining why unsigned i32 should be sign-extended. It won't be obvious to people who don't already know about this quirk of the ABI.
@spetrovic: I haven't seen a reply to this.



More information about the cfe-commits mailing list