Commit f57b8a2
committed
[windows] Always pass libcall
LLVM currently expects `__float128` to be both passed and returned in
xmm registers on Windows. However, this disagrees with the Windows
x86-64 calling convention [1], which indicates values larger than 64
bits should be passed indirectly.
Update LLVM's libcall calling convention to pass `fp128` directly.
Returning in xmm0 is unchanged since this seems like a reasonable
extrapolation of the ABI. With this patch, the calling convention for
`i128` and `f128` is the same.
GCC passes `__float128` indirectly, which this also matches. However, it
also returns indirectly, which is not done here. I intend to attempt a
GCC change to also return in `xmm0`, given the consistency with `i128`.
This corresponds to the frontend change in [2], see more details there.
[1]: https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170
[2]: #115052fp128 arguments indirectly1 parent a804c44 commit f57b8a2
File tree
5 files changed
+497
-172
lines changed- llvm
- lib/Target/X86
- test/CodeGen/X86
5 files changed
+497
-172
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
643 | 643 | | |
| 644 | + | |
644 | 645 | | |
645 | 646 | | |
646 | 647 | | |
| |||
0 commit comments