c-variadic: fix for sparc64#155660
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Apr 24, 2026
Merged
Conversation
Collaborator
|
|
tgross35
reviewed
Apr 22, 2026
Contributor
There was a problem hiding this comment.
Thanks for adding the docs. This makes sense to me, but similar to #152576 (and others) it would be good to have a regression test. Can probably just be based on top of that PR to reuse the test case.
validated versus https://godbolt.org/z/qrM37rY6n
41edc54 to
7970597
Compare
Collaborator
|
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. |
folkertdev
commented
Apr 23, 2026
| pub const unsafe fn va_arg<T: VaArgSafe>(ap: &mut VaList<'_>) -> T; | ||
|
|
||
| #[unsafe(no_mangle)] | ||
| unsafe extern "C" fn read_f64(ap: &mut VaList<'_>) -> f64 { |
Contributor
Author
There was a problem hiding this comment.
I verified this with https://godbolt.org/z/qrM37rY6n and we match it exactly.
Interestingly using LLVM IR directly will miscompile va_arg.
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 24, 2026
Rollup of 7 pull requests Successful merges: - #155660 (c-variadic: fix for sparc64) - #153482 (tests/ui/macros: add annotations for reference rules) - #155075 (Add docs about SDKs and C compilation on armv7a-vex-v5) - #155685 (Fix `get_child_at_index` return type hints) - #155686 (Fix array template arg lookup behavior) - #155689 (Const initialize `LOCK_LATCH` thread local) - #155690 (Fix classify_union to return Union for regular unions)
rust-timer
added a commit
that referenced
this pull request
Apr 24, 2026
Rollup merge of #155660 - folkertdev:sparc64-c-variadic, r=tgross35 c-variadic: fix for sparc64 tracking issue: #44930 Turns out it's a big-endian target that right-adjusts values in the stack slots. Apparently these tests do get run occasionally, though i don't think test failures are usually turned into issues on this repo. I guess we could add an assembly test here too, though really you just have to run these tests. I've tried this locally with qemu, and it passes all c-variadic tests. cc @thejpster @glaubitz r? tgross35
github-actions Bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Apr 24, 2026
Rollup of 7 pull requests Successful merges: - rust-lang/rust#155660 (c-variadic: fix for sparc64) - rust-lang/rust#153482 (tests/ui/macros: add annotations for reference rules) - rust-lang/rust#155075 (Add docs about SDKs and C compilation on armv7a-vex-v5) - rust-lang/rust#155685 (Fix `get_child_at_index` return type hints) - rust-lang/rust#155686 (Fix array template arg lookup behavior) - rust-lang/rust#155689 (Const initialize `LOCK_LATCH` thread local) - rust-lang/rust#155690 (Fix classify_union to return Union for regular unions)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tracking issue: #44930
Turns out it's a big-endian target that right-adjusts values in the stack slots.
Apparently these tests do get run occasionally, though i don't think test failures are usually turned into issues on this repo. I guess we could add an assembly test here too, though really you just have to run these tests. I've tried this locally with qemu, and it passes all c-variadic tests.
cc @thejpster @glaubitz
r? tgross35