summary refs log tree commit diff
path: root/src/test/pretty/asm.rs
blob: 9812f1d97e5ff21949c9c6097bc7f6188918e6f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![feature(asm)]

// pretty-mode:expanded
// pp-exact:asm.pp

pub fn main() {
    let a: i32;
    let mut b = 4i32;
    unsafe {
        asm!("");
        asm!("", options());
        asm!("", options(nostack, nomem));
        asm!("{}", in(reg) 4);
        asm!("{0}", out(reg) a);
        asm!("{name}", name = inout(reg) b);
        asm!("{} {}", out(reg) _, inlateout(reg) b => _);
        asm!("", out("al") _, lateout("rbx") _);
    }
}