[PATCH] D60748: Fix i386 struct and union parameter alignment

LiuChen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 29 00:09:16 PDT 2019


LiuChen3 added a comment.

In D60748#1681178 <https://reviews.llvm.org/D60748#1681178>, @kib wrote:

> In fact, can we have an option controlling this ?  Does it have anything to do with -malign-data gcc switch ?
>
> We do want to be able to optionally generate code ABI-compatible with modern gcc, per user discretion.


I found -malign-data option only affects data alignment in data segment. -malign-data has three options:  “compat”,“ abi” and “cacheline”.  The default in GCC is ”compat,“ and clang’s behavior is consistent with "abi". 
And the data alignment on stack and parameters Passing on stack is not affected.  This patch only affects the alignment of passing parameter.
Should we add an option just like -malign-data?


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

https://reviews.llvm.org/D60748





More information about the cfe-commits mailing list