rust-lang / rust-lang/rustc_codegen_cranelift
Full asm!() support
Open
Nobody has claimed this yet.
C-enhancement
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 157
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 3
Description
- Support
constoperands.- For inline asm (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1350)
- For global asm (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1351)
- Support
symoperands.- For inline asm (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1350)
- For global asm (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1351, but doesn't work when the function is made private to the codegen unit)
- Missing symbol mangling (
_prefix for Mach-O) (https://github.com/rust-lang/rustc_codegen_cranelift/pull/1630)
- Support asm goto (https://github.com/rust-lang/rust/pull/133870 will stabilize it for cg_llvm)
- Support register classes. This will require writing a mini register allocator to solve all register constraints. (#1206)
- Optimize
- Overlap input and output stack slots. (#1206)
- Skip saving caller saved registers. (#1206)
- Support more architectures
- Support inline asm on macOS (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1397)
- Support inline asm on Windows (https://github.com/rust-lang/rustc_codegen_cranelift/pull/1403)
- Avoid the object file linking hack. It doesn't work on macOS and Windows but is currently necessary as incr comp expects each codegen unit to provide a single object file instead of allowing an extra object file for the compiled assembly. (#1264)
- Use cgu name instead of function name as base for assembly stub names. The same function name may be used in multiple cgus when using
#[inline]. (122219237437ee1deee33df9806a4316194a6f76) - Run inline asm tests from the rustc test suite (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1397)
- Enable support by default (https://github.com/rust-lang/rustc_codegen_cranelift/pull/1403)
Tracking issue for stabilizing Has been stabilized.asm!(): https://github.com/rust-lang/rust/issues/72016
Contributor guide
No contributing guide indexed for this repository
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
Review the unchecked checklist items, starting with the global sym operand limitation described alongside PR 1351 and the asm goto work linked to rust-lang/rust#133870. Compare the backend's current status with those references and identify the remaining architecture gaps. Done means the outstanding checklist items are implemented and the tracking issue is updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100