[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 31 12:16:18 PDT 2018


efriedma added reviewers: aemerson, rjmccall.
efriedma added a comment.

I'm not sure Apple will want to mess with their ABI like this... adding some reviewers.

Otherwise LGTM.



================
Comment at: lib/CodeGen/TargetInfo.cpp:5790
   // than ABI alignment.
-  uint64_t ABIAlign = 4;
-  uint64_t TyAlign = getContext().getTypeAlign(Ty) / 8;
-  if (getABIKind() == ARMABIInfo::AAPCS_VFP ||
-       getABIKind() == ARMABIInfo::AAPCS)
-    ABIAlign = std::min(std::max(TyAlign, (uint64_t)4), (uint64_t)8);
-
+  uint64_t ABIAlign = 32;
+  uint64_t TyAlign;
----------------
I'd rather do alignment computations in bytes, rather than bits (can we use getTypeAlignInChars here?)


https://reviews.llvm.org/D46013





More information about the cfe-commits mailing list