Skip to content

Conversation

wzssyqa
Copy link

@wzssyqa wzssyqa commented Sep 10, 2025

Backport llvm#148214

[RISCV] Support PreserveMost calling convention (llvm#148214)

This adds the simplest implementation of PreserveMost calling convention and we preserve x5-x31 (except x6/x7/x28) registers.

Fixes llvm#148147.

This adds the simplest implementation of `PreserveMost` calling
convention and we preserve `x5-x31` (except x6/x7/x28) registers.

Fixes llvm#148147.
@nikic
Copy link

nikic commented Sep 10, 2025

Why is this being submitted as a backport against the Rust LLVM fork?

@wzssyqa
Copy link
Author

wzssyqa commented Sep 10, 2025

Why is this being submitted as a backport against the Rust LLVM fork?

tests/ui/abi/rust-cold-works-with-rustic-args.rs fails on riscv64gc-unknown-linux-gnu

--- stderr -------------------------------
rustc-LLVM ERROR: Unsupported calling convention
------------------------------------------

With this backport, this test can pass.

@dianqk
Copy link
Member

dianqk commented Sep 10, 2025

This shoud be backported to the upstream if possible. See also https://rustc-dev-guide.rust-lang.org/backend/updating-llvm.html.

@wzssyqa
Copy link
Author

wzssyqa commented Sep 13, 2025

See: llvm#158401

@wzssyqa
Copy link
Author

wzssyqa commented Sep 23, 2025

llvm#158402 has been merged.

@nikic nikic closed this Sep 23, 2025
@dianqk
Copy link
Member

dianqk commented Sep 23, 2025

rust-lang/rust#146953 includes this backport.

@wzssyqa wzssyqa deleted the rustlang-bpo branch September 24, 2025 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants