]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/asm-out-no-modifier.rs
Auto merge of #71230 - Dylan-DPC:rollup-rofigbv, r=Dylan-DPC
[rust.git] / src / test / ui / asm / asm-out-no-modifier.rs
1 // ignore-s390x
2 // ignore-emscripten
3 // ignore-powerpc
4 // ignore-powerpc64
5 // ignore-powerpc64le
6 // ignore-sparc
7 // ignore-sparc64
8 // ignore-mips
9 // ignore-mips64
10
11 #![feature(llvm_asm)]
12
13 fn foo(x: isize) { println!("{}", x); }
14
15 #[cfg(any(target_arch = "x86",
16           target_arch = "x86_64",
17           target_arch = "arm",
18           target_arch = "aarch64"))]
19 pub fn main() {
20     let x: isize;
21     unsafe {
22         llvm_asm!("mov $1, $0" : "r"(x) : "r"(5)); //~ ERROR output operand constraint lacks '='
23     }
24     foo(x);
25 }
26
27 #[cfg(not(any(target_arch = "x86",
28               target_arch = "x86_64",
29               target_arch = "arm",
30               target_arch = "aarch64")))]
31 pub fn main() {}