`asm!` should actually understand "can you address this register?"
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
In https://github.com/rust-lang/rust/pull/126849 I fixed a bug on 32-bit Arm regarding features that govern "which register fits where" by sorting the features based on register class hierarchically.
However, this bug is present on more than 32-bit Arm: https://github.com/rust-lang/rust/blob/0d8f734172ca17844a3c0f1d938222aac49b0d16/compiler/rustc_target/src/asm/aarch64.rs#L134-L149
In addition, there's some very ad-hoc restrictions showing up that in many cases are basically trying to encode the same thing:
I believe we should switch to modeling register addressability more directly, and test more exhaustively for all architectural variations people want us to support.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading PR 126849 and the register-class handling in compiler/rustc_target/src/asm/aarch64.rs, especially lines 134-149. Compare it with the ad-hoc restrictions in compiler/rustc_target/src/asm/riscv.rs, lines 81-96. Done means register addressability is modeled directly and architectural variations are tested exhaustively.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100