Skip to content

Rust's i128 return ABI does not agree with Clang and GCC on Windows targets #134288

Description

@tgross35

Originally reported at rust-lang/lang-team#255 (comment), Clang and GCC-MinGW return __int128 in xmm0. Rust currently returns it on the stack.

@wesleywiser has a proposed patch to make Clang return on the stack for -msvc targets, while keeping the behavior for MinGW wesleywiser/llvm-project@b2f8b83.

Rustc could probably just change the Windows ABI to always return in xmm0 for now, and then if the Clang patch lands we can change this to apply only to MinGW.

Demo: https://godbolt.org/z/o9h8We69o

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ABIArea: Concerning the application binary interface (ABI)A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.O-windowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions