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