unsafe: asm: 0/1 labels due to LLVM bug
Frankkkkk opened this issue · 1 comments
Frankkkkk commented
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 rust-lang/rust#84015 (ping @tdelabro 😊)
Thanks and cheers !
tdelabro commented
Here is the original issue and discussion that led to those changes: rust-lang/rust#76704
Maybe it's time to rework this part of the doc.