[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows
Phoebe Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 14 00:07:26 PST 2021
pengfei added a comment.
> I have a thought. Why do you need to change the LLVM data layout at all? Clang's record layout is distinct from LLVM's data layout. This is similar to how -malign-double works, which does not affect LLVM's data layout, it is entirely a frontend change.
We have to change LLVM data layout because it's required by the calling conversion.
1. We specified the alignment of `f80` on 32 bits to 0: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/X86/X86CallingConv.td#L869
2. Which means the alignment is actually determined by the data layout: https://github.com/llvm/llvm-project/blob/main/llvm/utils/TableGen/CallingConvEmitter.cpp#L200
As far as I understand it, `-malign-double` only affects the alignment of local and global variables. It has nothing to do with calling conversion.
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