[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double
Jason Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 20 13:11:17 PDT 2020
jasonliu added inline comments.
================
Comment at: clang/lib/AST/ASTContext.cpp:2533
+ hasFloatingPointAsFirstMember(RD, MaxFieldAlignment))
+ return std::max(ABIAlign, (unsigned)toBits(CharUnits::fromQuantity(8)));
+ }
----------------
I guess another thing that worth considering is how we support "pragma align(nature)" in the future. It requires us to get a normal alignment for AIX which means double will be aligned 8 byte in the structure.
Right now, we always set the double to be aligned 4 byte in PPC.h, but it's not necessary the case if that pragma is in effect. How double should be aligned in a structure is really position dependent (is the structure comes after `pragma align(nature)` or `pragma align(power)`?) I'm not very clear on how we would handle that with the current architect.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79719/new/
https://reviews.llvm.org/D79719
More information about the cfe-commits
mailing list