[PATCH] D78785: Fix x86/x86_64 calling convention for _ExtInt

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 24 10:48:26 PDT 2020


erichkeane marked an inline comment as done.
erichkeane added inline comments.


================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:2980
 
-    return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
-                                          : ABIArgInfo::getDirect());
+    if (!Ty->isExtIntType())
+      return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
----------------
rjmccall wrote:
> Presumably *some* `ExtInt` types should be returned directly.
Right, and they are.  This is only for cases where we request an 'indirect result', so cases where we've already decided that it cannot be passed direct.

At this point, the 'classify' step has already been done, which would have decided that <=128 bit values are passed 'direct', and we've requested an indirect.  At least as far as I can tell from this code/debugging.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78785/new/

https://reviews.llvm.org/D78785





More information about the cfe-commits mailing list