Skip to content

unsafe: asm: 0/1 labels due to LLVM bug #1792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Frankkkkk opened this issue Jan 3, 2024 · 1 comment
Open

unsafe: asm: 0/1 labels due to LLVM bug #1792

Frankkkkk opened this issue Jan 3, 2024 · 1 comment

Comments

@Frankkkkk
Copy link

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
Copy link

tdelabro commented Jan 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants