diff gen/tocall.cpp @ 1446:fe151804995a

Improve ABI conformance on x86 by passing the `sret` parameter in EAX if there's no `this`.
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 31 May 2009 12:43:59 +0200
parents 42bd767ec5a4
children a5526b7a5ae6
line wrap: on
line diff
--- a/gen/tocall.cpp	Sun May 31 17:11:51 2009 +0200
+++ b/gen/tocall.cpp	Sun May 31 12:43:59 2009 +0200
@@ -322,7 +322,8 @@
         // add attrs for hidden ptr
         Attr.Index = 1;
         Attr.Attrs = tf->fty.arg_sret->attrs;
-        assert((Attr.Attrs & llvm::Attribute::StructRet) && "Sret arg not sret?");
+        assert((Attr.Attrs & (llvm::Attribute::StructRet | llvm::Attribute::InReg))
+            && "Sret arg not sret or inreg?");
         attrs.push_back(Attr);
     }