On Mon, Oct 22, 2012 at 7:17 PM, Rafael Espíndola
<[email protected]> wrote:
> Rebased patches on top of the recent regparm fix are attached.

no-padding.patch looks fine.

+    if (AI.getPaddingType()) {
+      if (CallingConv == llvm::CallingConv::X86_FastCall) {
+        llvm::AttrBuilder PadAttrs;
+        PadAttrs.addAttribute(llvm::Attributes::InReg);
+
+        llvm::Attributes A =llvm::Attributes::get(getLLVMContext(), PadAttrs);
+        PAL.push_back(llvm::AttributeWithIndex::get(Index, A));
+      }
+      // Increment Index if there is padding.
+      ++Index;
+    }

I really don't like that we're checking for a platform-specific
calling convention in target-independent code.  (If you need an extra
flag in the ABIArgInfo to distinguish regular padding and inreg
padding, feel free to add one.)

-Eli

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to