[PATCH] D146242: [ARM] Fixing ABI mismatch for packed structs passed as function arguments

Momchil Velikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 16 03:34:37 PDT 2023


chill added a comment.

I was just thinking to LGTM it :)

IMHO, the alignment adjustment  happens because of C.4 (B.3 indeed leave the HFA/HVA unmodified).

> C.4	If the argument is an HFA, an HVA, a Quad-precision Floating-point or short vector type then the NSAA is rounded up to the next multiple of 8 if its natural alignment is ≤ 8 or the next multiple of 16 if its natural alignment is ≥ 16.

Browsing the AAPCS HFA and HVA seem always treated the same, and looking at `bool AArch64ABIInfo::isHomogeneousAggregateBaseType(QualType Ty) const` it
recognized both FP types and 64- and 128- bit vectors, so we have uniform treatment there as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146242



More information about the cfe-commits mailing list