From cd1644a658825b1aa87f1b54fafb49159d72c992 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sat, 9 Sep 2023 12:50:25 -0400 Subject: [PATCH] Fix const handling in ATT syntax --- src/asm.rs | 4 ---- tests/run/asm.rs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/asm.rs b/src/asm.rs index 4c3b7f5036c..b0e615d2de2 100644 --- a/src/asm.rs +++ b/src/asm.rs @@ -452,10 +452,6 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { } InlineAsmOperandRef::Const { ref string } => { - // Const operands get injected directly into the template - if att_dialect { - template_str.push('$'); - } template_str.push_str(string); } } 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)