[mips64][clang] Provide the signext attribute for i32 return values

Additional info: see r338019.

Differential Revision: https://reviews.llvm.org/D49289

llvm-svn: 338239
This commit is contained in:
Stefan Maksimovic 2018-07-30 10:44:46 +00:00
parent 0d466c41ff
commit b9da8a5dff
1 changed files with 8 additions and 2 deletions

View File

@ -6985,8 +6985,14 @@ ABIArgInfo MipsABIInfo::classifyReturnType(QualType RetTy) const {
if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
RetTy = EnumTy->getDecl()->getIntegerType();
return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend(RetTy)
: ABIArgInfo::getDirect());
if (RetTy->isPromotableIntegerType())
return ABIArgInfo::getExtend(RetTy);
if ((RetTy->isUnsignedIntegerOrEnumerationType() ||
RetTy->isSignedIntegerOrEnumerationType()) && Size == 32 && !IsO32)
return ABIArgInfo::getSignExtend(RetTy);
return ABIArgInfo::getDirect();
}
void MipsABIInfo::computeInfo(CGFunctionInfo &FI) const {