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 pub fn min_align_of<T>() -> usize;
13 #[cfg(any(target_os = "android",
14 target_os = "dragonfly",
15 target_os = "emscripten",
16 target_os = "freebsd",
17 target_os = "fuchsia",
18 target_os = "illumos",
22 target_os = "openbsd",
23 target_os = "solaris",
24 target_os = "vxworks"))]
26 #[cfg(target_arch = "x86")]
29 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
30 assert_eq!(::rusti::min_align_of::<u64>(), 4);
34 #[cfg(not(target_arch = "x86"))]
37 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
38 assert_eq!(::rusti::min_align_of::<u64>(), 8);
43 #[cfg(target_env = "sgx")]
45 #[cfg(target_arch = "x86_64")]
48 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
49 assert_eq!(::rusti::min_align_of::<u64>(), 8);
54 #[cfg(target_os = "windows")]
58 assert_eq!(::rusti::pref_align_of::<u64>(), 8);
59 assert_eq!(::rusti::min_align_of::<u64>(), 8);