15 fn add_asm(a: i64, b: i64) -> i64;
35 asm!("mov {input}, {output}",
37 input = in(reg) input,
55 asm!("mov {output}, {input}",
57 input = in(reg) input,
63 // check inout(reg_class) x
72 // check inout("reg") x
83 // inout(class) x => y
92 inout("eax") x => res,
109 // check const (ATT syntax)
121 extern "C" fn foo() -> u64 { 42 }
124 asm!("call {}", sym foo, lateout("rax") x);
128 // check sym fn (ATT syntax)
131 asm!("call {}", sym foo, lateout("rax") x, options(att_syntax));
136 static FOO: u64 = 42;
139 asm!("mov {1}, qword ptr [rip + {0}]", sym FOO, lateout(reg) x);
143 // check sym static (ATT syntax)
146 asm!("movq {0}(%rip), {1}", sym FOO, lateout(reg) x, options(att_syntax));
150 assert_eq!(unsafe { add_asm(40, 2) }, 42);