]> git.proxmox.com Git - rustc.git/blob - src/stdsimd/crates/core_arch/src/arm/mod.rs
New upstream version 1.34.2+dfsg1
[rustc.git] / src / stdsimd / crates / core_arch / src / arm / mod.rs
1 //! ARM intrinsics.
2 //!
3 //! The reference for NEON is [ARM's NEON Intrinsics Reference][arm_ref]. The
4 //! [ARM's NEON Intrinsics Online Database][arm_dat] is also useful.
5 //!
6 //! [arm_ref]: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0073a/IHI0073A_arm_neon_intrinsics_ref.pdf
7 //! [arm_dat]: https://developer.arm.com/technologies/neon/intrinsics
8 #![allow(non_camel_case_types)]
9
10 mod armclang;
11
12 pub use self::armclang::*;
13
14 #[cfg(any(target_feature = "mclass", dox))]
15 mod cmsis;
16 #[cfg(any(target_feature = "mclass", dox))]
17 pub use self::cmsis::*;
18
19 mod v6;
20 pub use self::v6::*;
21
22 #[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
23 mod v7;
24 #[cfg(any(target_arch = "aarch64", target_feature = "v7"))]
25 pub use self::v7::*;
26
27 #[cfg(any(all(target_feature = "v7", not(target_feature = "mclass")), dox))]
28 mod dsp;
29 #[cfg(any(all(target_feature = "v7", not(target_feature = "mclass")), dox))]
30 pub use self::dsp::*;
31
32 // NEON is supported on AArch64, and on ARM when built with the v7 and neon
33 // features. Building ARM without neon produces incorrect codegen.
34 #[cfg(any(
35 target_arch = "aarch64",
36 all(target_feature = "v7", target_feature = "neon"),
37 dox
38 ))]
39 mod neon;
40 #[cfg(any(
41 target_arch = "aarch64",
42 all(target_feature = "v7", target_feature = "neon"),
43 dox
44 ))]
45 pub use self::neon::*;
46
47 #[cfg(test)]
48 use stdsimd_test::assert_instr;
49
50 /// Generates the trap instruction `UDF`
51 #[cfg(target_arch = "arm")]
52 #[cfg_attr(test, assert_instr(udf))]
53 #[inline]
54 pub unsafe fn udf() -> ! {
55 ::intrinsics::abort()
56 }