Skip to content

Commit

Permalink
don't use label starting with 1
Browse files Browse the repository at this point in the history
Starting with the latest nightly, this results in an error:

error: avoid using labels containing only the digits `0` and `1` in inline assembly
  --> src/instructions/segmentation.rs:81:18
   |
81 |                 "1:",
   |                  ^ use a different label that doesn't start with `0` or `1`
   |
   = note: an LLVM bug makes these labels ambiguous with a binary literal number
   = note: `#[deny(binary_asm_labels)]` on by default
  • Loading branch information
Freax13 committed Nov 30, 2024
1 parent 0ee8fef commit ab8962f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/instructions/segmentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ impl Segment for CS {
unsafe {
asm!(
"push {sel}",
"lea {tmp}, [1f + rip]",
"lea {tmp}, [55f + rip]",
"push {tmp}",
"retfq",
"1:",
"55:",
sel = in(reg) u64::from(sel.0),
tmp = lateout(reg) _,
options(preserves_flags),
Expand Down

0 comments on commit ab8962f

Please sign in to comment.