Skip to content

Commit

Permalink
Fix asm.rs test
Browse files Browse the repository at this point in the history
`add 1, %rax` in AT&T syntax gets interpreted as `add rax, qword ptr [1]`. Use `$` to make it explicit that it is a constant rather than an address.
  • Loading branch information
bjorn3 committed Jul 12, 2023
1 parent e062c2c commit 5b455eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/run/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ fn main() {
// check const (ATT syntax)
let mut x: u64 = 42;
unsafe {
asm!("add {}, {}",
asm!("add ${}, {}",
const 1,
inout(reg) x,
options(att_syntax)
Expand Down

0 comments on commit 5b455eb

Please sign in to comment.