From 5b455eb9540d85bf349797ed1476239c8ce2dbdd Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 12 Jul 2023 20:34:15 +0200 Subject: [PATCH] Fix asm.rs test `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. --- tests/run/asm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run/asm.rs b/tests/run/asm.rs index 38c1eac7adf..507b65ca049 100644 --- a/tests/run/asm.rs +++ b/tests/run/asm.rs @@ -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)