[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 14 13:00:13 PST 2021


rnk added a comment.

In D115441#3191482 <https://reviews.llvm.org/D115441#3191482>, @pengfei wrote:

> We have to change LLVM data layout because it's required by the calling conversion.

Is that necessary? It would be simpler to leave the fp80 value 4 byte aligned, which I believe is consistent with the way doubles are passed unaligned. GCC doesn't align fp80 long double to 16 bytes on i686, so I see no reason for LLVM to do it. Is there some other compiler that you need ABI compatibility with?

Also consider that in LLVM, the alignment of arguments passed in memory is not observable (unless byval or inalloca is used). If the user takes the address of an argument, they actually take the address of a local alloca, which is a copy of the argument. The frontend (clang) decides the alignment of the alloca.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115441



More information about the cfe-commits mailing list