Skip to content

Use emit_ptr_va_arg for va_arg on M68k - #165465

Open
beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:va-arg-m68k
Open

beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:va-arg-m68k

Conversation

@beetrees

@beetrees beetrees commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

This avoids using the LLVM va_arg instruction. AFAICT LLVM's implementation currently miscompiles the va_arg instruction for f64 (and needlessly aligns the pointer that is guaranteed to be aligned for i32 and i64) - this PR matches GCC (checked by comparing the assembly).

Ping target maintainers: @glaubitz @ricky26 @knickish

r? @folkertdev

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 4, 2026
@beetrees beetrees added the O-motorola68k Target: Rust from the parallel universe where the Amiga won. label Nov 4, 2026
@rust-bors

rust-bors Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-motorola68k Target: Rust from the parallel universe where the Amiga won. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

3 participants