Incorrect relative jump (rjmp) code generation in latest nightly release for AVR toolchain #129301
Labels
A-codegen
Area: Code generation
A-inline-assembly
Area: Inline assembly (`asm!(…)`)
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-asm
`#![feature(asm)]` (not `llvm_asm`)
I-miscompile
Issue: Correct Rust code lowers to incorrect machine code
O-AVR
Target: AVR processors (ATtiny, ATmega, etc.)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I've already asked this question on stack exchange where you can see more details.
I tried the following code:
The
RUSTFLAGS="--emit asm"
output is also correct, but the machine code generated is faulty. For now I've switched to nightly-2023-12-11, which seems to work just fine.For the disassembly of both the
--emit asm
and the final binary, you can refer to the stack exchange post.Here's a minimal example that doesn't work on nightly (but works on nightly-2023-12-11):
The text was updated successfully, but these errors were encountered: