Skip to content

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

Open
@Frankkkkk

Description

@Frankkkkk

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 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions