[cfe-commits] Patch for pr11688 to make i386-pc-win32 subtarget use SmallStructInRegABI

Eli Friedman eli.friedman at gmail.com
Tue Jan 17 16:06:29 PST 2012


On Tue, Jan 17, 2012 at 3:29 PM, Joe Groff <arcata at gmail.com> wrote:
> On Tue, Jan 17, 2012 at 12:45 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>> The change to lib/CodeGen/TargetInfo.cpp seems fine.  The test seems
>> like it's overkill, since it looks like it was mostly copy-pasted;
>> testing a couple small functions which illustrate the significant
>> characteristics would suffice.
>
> Thanks for the feedback. Attached is a revised patch that pares down
> the test suite only to Win32-specific characteristics. I also found
> and fixed another discrepancy with MSVC's calling convention; MSVC
> returns struct {float;} and struct {double;} types in GPRs, unlike
> other SmallStructABI platforms that return those types on the x87
> stack. This new patch fixes and tests those cases as well.

-          return
ABIArgInfo::getDirect(llvm::Type::getDoubleTy(getVMContext()));
+          if (IsWin32FloatStructABI)
+            return
ABIArgInfo::getDirect(llvm::Type::getInt64Ty(getVMContext()));
+          else
+            return
ABIArgInfo::getDirect(llvm::Type::getDoubleTy(getVMContext()));

80 columns.

Also, this doesn't apply against trunk.

-Eli




More information about the cfe-commits mailing list