diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2023-09-09 12:50:25 -0400 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2023-09-09 12:50:25 -0400 |
| commit | cd1644a658825b1aa87f1b54fafb49159d72c992 (patch) | |
| tree | 32670d893ddbe59acca7d4bb6703d2c67e32ebb3 | |
| parent | e39f3a24847ecea0542c8a3b9c776913c6e7be83 (diff) | |
| download | rust-cd1644a658825b1aa87f1b54fafb49159d72c992.tar.gz rust-cd1644a658825b1aa87f1b54fafb49159d72c992.zip | |
Fix const handling in ATT syntax
| -rw-r--r-- | src/asm.rs | 4 | ||||
| -rw-r--r-- | tests/run/asm.rs | 2 |
2 files changed, 1 insertions, 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) |
