rust-lang / rust-lang/rust-by-example
unsafe: asm: 0/1 labels due to LLVM bug
Nobody has claimed this yet.
- Dominant language
- Handlebars
- Stars
- 8.1k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I was reading the asm documentation and I stumbled upon this part:
Moreover, on x86 when using the default Intel syntax, due to [an LLVM bug], you shouldn't use labels exclusively made of `0` and `1` digits, e.g. `0`, `11` or `101010`, as they may end up being interpreted as binary values. Using `options(att_syntax)` will avoid any ambiguity, but that affects the syntax of the _entire_ `asm!` block. (See [Options](#options), below, for more on `options`.)
[an LLVM bug]: https://bugs.llvm.org/show_bug.cgi?id=36144
https://github.com/rust-lang/rust-by-example/blob/master/src/unsafe/asm.md?plain=1#L415
However, looking at the bug tracker, this bugs seems to have been closed some years ago.
The origin seems to come from https://github.com/rust-lang/rust/pull/84015 (ping @tdelabro 😊)
Thanks and cheers !
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 at src/unsafe/asm.md around line 415 and review Rust pull request #84015 plus the linked LLVM issue 36144. Confirm whether the label restriction still applies in current LLVM and Rust behavior. Done means the asm documentation accurately describes the current behavior and its references are up to date.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100