Repository navigation
Conversation
|
Some changes occurred in compiler/rustc_target/src/callconv/amdgpu.rs cc @Flakebi |
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
||
| #[rustc_abi(debug)] | ||
| extern "C" fn pass_zst(_: ()) {} //~ ERROR: fn_abi | ||
| extern "C" fn pass_zst(_: Czst) {} //~ ERROR: fn_abi |
There was a problem hiding this comment.
This was testing a Rust ZST, not a C ZST. I've added a new test for Rust ZSTs.
|
Aside from the SPARC bugfix no behavior changes are intended. |
This comment has been minimized.
This comment has been minimized.
3c50d78 to
2848ca9
Compare
|
|
This comment has been minimized.
This comment has been minimized.
2848ca9 to
55e1ad2
Compare
This comment has been minimized.
This comment has been minimized.
55e1ad2 to
f68eaaf
Compare
This comment has been minimized.
This comment has been minimized.
|
also I was thinking that we can probably land most of the test changes as an NFC PR? |
|
idk if you've already reviewed the whole thing that may not be needed at this point, but at least to me it would make reviewing easier, the diff is (by necessity) a total mess. |
|
I agree it would be good to land the test changes first separately (probably with the fix for SPARC to make this PR a NFC) so that it's easy to see from CI that this refactor doesn't affect the output. |
This comment has been minimized.
This comment has been minimized.
f68eaaf to
38ec2fe
Compare
This comment has been minimized.
This comment has been minimized.
|
Split the testing changes and SPARC fix into #166098 |
38ec2fe to
60050ba
Compare
Actually test ABI for C ZSTs and fix Rust ZST ABI for SPARC Split out of rust-lang#165920 r? @beetrees
Actually test ABI for C ZSTs and fix Rust ZST ABI for SPARC Split out of rust-lang/rust#165920 r? @beetrees
60050ba to
eb09693
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Actually test ABI for C ZSTs and fix Rust ZST ABI for SPARC Split out of rust-lang/rust#165920 r? @beetrees
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
af27c68 to
fe548f4
Compare
|
Thanks! |
|
@bors r- Could you squash the review changes first? Then |
|
This pull request was unapproved. |
This deduplicates code between most callconv computation implementations. 32bit x86 has some postprocessing going on that makes it non-trivial to use this abstraction, but for all other archs it works fine.
And make sure Rust ZSTs are always ignored. Previously they incorrectly got passed by-ref on SPARC.
ExternAbi distinguishes between ABIs that should have identical callconvs.
fe548f4 to
c4c1ae8
Compare
|
Squashed review changes and checked that the diff is unchanged. @bors r=beetrees |
Introduce compute_abi helper and ComputeCallConv trait This deduplicates code between most callconv computation implementations. 32bit x86 has some postprocessing going on that makes it non-trivial to use this abstraction, but for all other archs it works fine. After that deduplicate ZST arg/ret handling and make sure Rust ZSTs are always ignored. Previously they incorrectly got passed by-ref on SPARC. This will help a bit with rust-lang#119183 by marking it easier to ensure code like the `repr(transparent)` handling is done consistently across all targets.
View all comments
This deduplicates code between most callconv computation implementations. 32bit x86 has some postprocessing going on that makes it non-trivial to use this abstraction, but for all other archs it works fine.
After that deduplicate ZST arg/ret handling and make sure Rust ZSTs are always ignored. Previously they incorrectly
got passed by-ref on SPARC.
This will help a bit with #119183 by marking it easier to ensure code like the
repr(transparent)handling is done consistently across all targets.