In http://reviews.llvm.org/D9198#162493, @spetrovic wrote:
> There are two solutions for i32 signext problem. First, i32 argument pass > directly (in that case i32 will be sign extended) this fix is in MIPS part. > > Second solution is fix in common code as I mentioned (CGCall.cpp file, > ConstructAttributeList function). This would required new hook in TargetInfo. > I think first solution is better for this problem. I agree that the first solution is the better approach but it shouldn't be passed direct. That would cause the backend to sign-extend on the callee side as well as the caller side. This happens because directly passed arguments have undefined upper bits and the operations sometimes (e.g. comparisons, shifts, etc.) require a sign/zero extension. It should be passed signext. http://reviews.llvm.org/D9198 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/ _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits