1 // ensures that public symbols are not removed completely
3 // we can compile to a variety of platforms, because we don't need
4 // cross-compiled standard libraries.
5 #![feature(no_core, auto_traits)]
7 #![feature(repr_simd, simd_ffi, link_llvm_intrinsics, lang_items, rustc_attrs)]
11 pub struct f32x4(f32, f32, f32, f32);
14 #[link_name = "llvm.sqrt.v4f32"]
15 fn vsqrt(x: f32x4) -> f32x4;
18 pub fn foo(x: f32x4) -> f32x4 {
24 pub struct i32x4(i32, i32, i32, i32);
28 #[cfg(any(target_arch = "x86", target_arch = "x86-64"))]
29 #[link_name = "llvm.x86.sse2.psll.d"]
30 fn integer(a: i32x4, b: i32x4) -> i32x4;
33 #[cfg(target_arch = "arm")]
34 #[link_name = "llvm.arm.neon.vmaxs.v4i32"]
35 fn integer(a: i32x4, b: i32x4) -> i32x4;
37 #[cfg(target_arch = "aarch64")]
38 #[link_name = "llvm.aarch64.neon.maxs.v4i32"]
39 fn integer(a: i32x4, b: i32x4) -> i32x4;
41 // just some substitute foreign symbol, not an LLVM intrinsic; so
42 // we still get type checking, but not as detailed as (ab)using
46 target_arch = "x86-64",
48 target_arch = "aarch64"
50 fn integer(a: i32x4, b: i32x4) -> i32x4;
53 pub fn bar(a: i32x4, b: i32x4) -> i32x4 {
54 unsafe { integer(a, b) }
74 #[rustc_builtin_macro]