3 #![feature(repr_simd, never_type, asm_sym)]
5 use std::arch::{asm, global_asm};
9 struct SimdType(f32, f32, f32, f32);
12 struct SimdNonCopy(f32, f32, f32, f32);
16 // Inputs must be initialized
19 asm!("{}", in(reg) x);
20 //~^ ERROR used binding `x` isn't initialized
22 asm!("{}", inout(reg) y);
23 //~^ ERROR used binding `y` isn't initialized
26 // Outputs require mutable places
28 let v: Vec<u64> = vec![0, 1, 2];
29 asm!("{}", in(reg) v[0]);
30 asm!("{}", out(reg) v[0]);
31 //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable
32 asm!("{}", inout(reg) v[0]);
33 //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable
35 // Sym operands must point to a function or static