[PATCH] D15054: [X86] Better support for the MCU psABI
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 29 04:36:23 PST 2015
mkuper added a comment.
The clang part of this patch is http://reviews.llvm.org/D15055 .
================
Comment at: lib/Target/X86/X86CallingConv.h:46
@@ -44,1 +45,3 @@
+inline bool CC_X86_32_MCUInReg(unsigned &ValNo, MVT &ValVT,
+ MVT &LocVT,
----------------
I am not a big fan of this, but I couldn't think of a better to do it (and the idea here is stolen from similar code in the ARM codegen, although the set of constraints there is a bit different).
Other suggestions are welcome.
================
Comment at: lib/Target/X86/X86FastISel.cpp:1105
@@ -1104,4 +1104,3 @@
// and into %rax. We also do the same with %eax for Win32.
- if (F.hasStructRetAttr() &&
- (Subtarget->is64Bit() || Subtarget->isTargetKnownWindowsMSVC())) {
+ if (F.hasStructRetAttr()) {
unsigned Reg = X86MFInfo->getSRetReturnReg();
----------------
This is actually not an MCU-related issue - this code should fire for x86 regardless of bitness and windows-ness. The DAG-based selection does the right thing, but FastISel didn't. Of course, since the MCU is non-windows 32-bit, it also hits this.
http://reviews.llvm.org/D15054
More information about the llvm-commits
mailing list