Fix const handling in ATT syntax
This commit is contained in:
parent
e39f3a2484
commit
cd1644a658
@ -452,10 +452,6 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
InlineAsmOperandRef::Const { ref string } => {
|
InlineAsmOperandRef::Const { ref string } => {
|
||||||
// Const operands get injected directly into the template
|
|
||||||
if att_dialect {
|
|
||||||
template_str.push('$');
|
|
||||||
}
|
|
||||||
template_str.push_str(string);
|
template_str.push_str(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ fn main() {
|
|||||||
// check const (ATT syntax)
|
// check const (ATT syntax)
|
||||||
let mut x: u64 = 42;
|
let mut x: u64 = 42;
|
||||||
unsafe {
|
unsafe {
|
||||||
asm!("add {}, {}",
|
asm!("add ${}, {}",
|
||||||
const 1,
|
const 1,
|
||||||
inout(reg) x,
|
inout(reg) x,
|
||||||
options(att_syntax)
|
options(att_syntax)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user