[PATCH] D59744: Fix i386 ABI "__m64" type bug

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 09:56:39 PDT 2019


rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.

Minor comments, then LGTM.



================
Comment at: lib/CodeGen/TargetInfo.cpp:1094
+    // FreeBSD) don't want to spend any effort dealing with the ramifications
+    // of ABI breaks at present.
+    const llvm::Triple &T = getTarget().getTriple();
----------------
"The System V i386 psABI requires __m64 to be passed in MMX registers.
Clang historically had a bug where it failed to apply this rule, and some platforms
(e.g. Darwin, PS4, and FreeBSD) have opted to maintain compatibility with the old
Clang behavior, so we only apply it on platforms that have specifically requested it
(currently just Linux and NetBSD)."


================
Comment at: lib/CodeGen/TargetInfo.cpp:1417
+    if (VT->getElementType()->isIntegerType() && Size == 64 &&
+      isPassInMMXRegABI())
+      return ABIArgInfo::getDirect(llvm::Type::getX86_MMXTy(getVMContext()));
----------------
Indentation on the continuation line.


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

https://reviews.llvm.org/D59744





More information about the cfe-commits mailing list