[all-commits] [llvm/llvm-project] 5ee1c0: [windows] Always pass fp128 arguments indirectly (...

Trevor Gross via All-commits all-commits at lists.llvm.org
Thu Mar 6 04:14:32 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ee1c0b7148571ed9d60e447b66fb0f35de14576
      https://github.com/llvm/llvm-project/commit/5ee1c0b7148571ed9d60e447b66fb0f35de14576
  Author: Trevor Gross <tmgross at umich.edu>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M llvm/docs/ReleaseNotes.md
    M llvm/lib/Target/X86/X86CallingConv.td
    A llvm/test/CodeGen/X86/fp128-abi.ll
    M llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
    M llvm/test/CodeGen/X86/fp128-libcalls.ll
    M llvm/test/CodeGen/X86/scalar-fp-to-i32.ll
    M llvm/test/CodeGen/X86/scalar-fp-to-i64.ll

  Log Message:
  -----------
  [windows] Always pass fp128 arguments indirectly (#128848)

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 default Windows 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` rather than making that change here,
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]: https://github.com/llvm/llvm-project/pull/115052



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list