1 //! Aarch64 run-time features.
3 /// Checks if `aarch64` feature is enabled.
5 #[unstable(feature = "stdsimd", issue = "27731")]
6 #[allow_internal_unstable(stdsimd_internal,stdsimd)]
7 macro_rules
! is_aarch64_feature_detected
{
9 // FIXME: this should be removed once we rename Aarch64 neon to asimd
10 cfg
!(target_feature
= "neon") ||
11 $
crate::detect
::check_for($
crate::detect
::Feature
::asimd
)
14 cfg
!(target_feature
= "neon") ||
15 $
crate::detect
::check_for($
crate::detect
::Feature
::asimd
)
18 cfg
!(target_feature
= "pmull") ||
19 $
crate::detect
::check_for($
crate::detect
::Feature
::pmull
)
22 cfg
!(target_feature
= "fp") ||
23 $
crate::detect
::check_for($
crate::detect
::Feature
::fp
)
26 cfg
!(target_feature
= "fp16") ||
27 $
crate::detect
::check_for($
crate::detect
::Feature
::fp16
)
30 cfg
!(target_feature
= "sve") ||
31 $
crate::detect
::check_for($
crate::detect
::Feature
::sve
)
34 cfg
!(target_feature
= "crc") ||
35 $
crate::detect
::check_for($
crate::detect
::Feature
::crc
)
38 cfg
!(target_feature
= "crypto") ||
39 $
crate::detect
::check_for($
crate::detect
::Feature
::crypto
)
42 cfg
!(target_feature
= "lse") ||
43 $
crate::detect
::check_for($
crate::detect
::Feature
::lse
)
46 cfg
!(target_feature
= "rdm") ||
47 $
crate::detect
::check_for($
crate::detect
::Feature
::rdm
)
50 cfg
!(target_feature
= "rcpc") ||
51 $
crate::detect
::check_for($
crate::detect
::Feature
::rcpc
)
54 cfg
!(target_feature
= "dotprod") ||
55 $
crate::detect
::check_for($
crate::detect
::Feature
::dotprod
)
58 compile_error
!("\"ras\" feature cannot be detected at run-time")
61 compile_error
!("\"v8.1a\" feature cannot be detected at run-time")
64 compile_error
!("\"v8.2a\" feature cannot be detected at run-time")
67 compile_error
!("\"v8.3a\" feature cannot be detected at run-time")
70 is_aarch64_feature_detected
!($t
);
72 ($t
:tt
) => { compile_error!(concat!("unknown aarch64 target feature: ", $t)) }
;
75 /// ARM Aarch64 CPU Feature enum. Each variant denotes a position in a bitset
76 /// for a particular feature.
78 /// PLEASE: do not use this, it is an implementation detail subject to change.
80 #[allow(non_camel_case_types)]
82 #[unstable(feature = "stdsimd_internal", issue = "0")]
84 /// ARM Advanced SIMD (ASIMD)
86 /// Polynomial Multiply
88 /// Floating point support
90 /// Half-float support.
92 /// Scalable Vector Extension (SVE)
94 /// CRC32 (Cyclic Redundancy Check)
96 /// Crypto: AES + PMULL + SHA1 + SHA2
98 /// Atomics (Large System Extension)
100 /// Rounding Double Multiply (ASIMDRDM)
102 /// Release consistent Processor consistent (RcPc)
104 /// Vector Dot-Product (ASIMDDP)