2 // ignore-wasm32-bare seems not important to test here
4 #![feature(intrinsics)]
7 extern "rust-intrinsic" {
8 pub fn pref_align_of<T>() -> usize;
9 #[rustc_safe_intrinsic]
10 pub fn min_align_of<T>() -> usize;
14 #[cfg(any(target_os = "android",
15 target_os = "dragonfly",
16 target_os = "emscripten",
17 target_os = "freebsd",
18 target_os = "fuchsia",
19 target_os = "illumos",
23 target_os = "openbsd",
24 target_os = "solaris",
25 target_os = "vxworks"))]
27 #[cfg(target_arch = "x86")]
30 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
31 assert_eq!(::rusti::min_align_of::<u64>(), 4);
35 #[cfg(not(target_arch = "x86"))]
38 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
39 assert_eq!(::rusti::min_align_of::<u64>(), 8);
44 #[cfg(target_env = "sgx")]
46 #[cfg(target_arch = "x86_64")]
49 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
50 assert_eq!(::rusti::min_align_of::<u64>(), 8);
55 #[cfg(target_os = "windows")]
59 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
60 assert_eq!(::rusti::min_align_of::<u64>(), 8);