Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ZST ABI handling to rustc_target #125854

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beetrees
Copy link
Contributor

@beetrees beetrees commented Jun 1, 2024

Currently, target specific handling of ZST function call ABI (specifically passing them indirectly instead of ignoring them) is handled in rustc_ty_utils, whereas all other target specific function call ABI handling is located in rustc_target. This PR moves the ZST handling to rustc_target so that all the target-specific function call ABI handling is in one place. In the process of doing so, this PR fixes #125850 by ensuring that ZST arguments are always correctly ignored in the x86-64 "sysv64" ABI; any code which would be affected by this fix would have ICEd before this PR. Tests are also added using #[rustc_abi(debug)] to ensure this behaviour does not regress.

Fixes #125850

@rustbot
Copy link
Collaborator

rustbot commented Jun 1, 2024

r? @estebank

rustbot has assigned @estebank.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 1, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jun 1, 2024

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@bors
Copy link
Contributor

bors commented Jun 23, 2024

☔ The latest upstream changes (presumably #124733) made this pull request unmergeable. Please resolve the merge conflicts.

@estebank
Copy link
Contributor

r=me after rebase

@estebank estebank added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 12, 2024
@beetrees
Copy link
Contributor Author

beetrees commented Jul 12, 2024

@estebank Rebased. I've also added a normalize-stderr-test to the tests (taken from tests/ui/abi/debug.rs) to prevent the tests being sensitive to preferred alignment differences between targets.

@rustbot label -S-waiting-on-author

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE when compiling for x86_64-pc-windows-gnu when passing a ZST using the "sysv64" ABI
4 participants