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.
This merge request contains two commits cherry-picked from LLVM's main branch that solve the infamous
LLVM ERROR: Not supported instr
problem¹, making rustc able to compile for AVR back again 🙂At the moment people wanting to play with Rust + AVR are being forced to use the, uhm, mature version of
nightly-2021-01-07
that doesn't crash withNot supported instr
, but contains a multitude of codegen bugs that have been since fixed in LLVM (e.g. rust-lang/rust#79889 should Just Work ™️ now, but people can't really test it if they are still using the older compiler).Checks
I've checked the code by compiling rustc locally and simavr-ing a few examples from https://github.com/Rahix/avr-hal/tree/5d757696e338104622a0f89c51020b718bf48b62/examples/arduino-uno - everything seems to be working correctly.
I'm also developing a bit more complex AVR application (firmware? 🙃) myself, and I haven't noticed any compiler bugs, including when running the code on an actual Atmega328p.
¹ rust-lang/rust#82104, rust-lang/rust#83633