Auto merge of #125854 - beetrees:zst-arg-abi, r=estebank

Move ZST ABI handling to `rustc_target`

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
This commit is contained in:
bors 2024-08-18 22:15:41 +00:00
commit d0293c6cf2
19 changed files with 766 additions and 43 deletions

View file

@ -92,10 +92,12 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-nvptx64-nvidia-cuda",
"ignore-openbsd",
"ignore-pass",
"ignore-powerpc",
"ignore-remote",
"ignore-riscv64",
"ignore-s390x",
"ignore-sgx",
"ignore-sparc64",
"ignore-spirv",
"ignore-stable",
"ignore-stage1",
@ -123,6 +125,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-x86",
"ignore-x86_64",
"ignore-x86_64-apple-darwin",
"ignore-x86_64-pc-windows-gnu",
"ignore-x86_64-unknown-linux-gnu",
"incremental",
"known-bug",
@ -191,7 +194,9 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"only-msvc",
"only-nightly",
"only-nvptx64",
"only-powerpc",
"only-riscv64",
"only-s390x",
"only-sparc",
"only-sparc64",
"only-stable",