| 1 | #![allow (dead_code)] |
| 2 | |
| 3 | // Export the macros for all supported architectures. |
| 4 | #[macro_use ] |
| 5 | mod x86; |
| 6 | #[macro_use ] |
| 7 | mod arm; |
| 8 | #[macro_use ] |
| 9 | mod aarch64; |
| 10 | #[macro_use ] |
| 11 | mod riscv; |
| 12 | #[macro_use ] |
| 13 | mod powerpc; |
| 14 | #[macro_use ] |
| 15 | mod powerpc64; |
| 16 | #[macro_use ] |
| 17 | mod mips; |
| 18 | #[macro_use ] |
| 19 | mod mips64; |
| 20 | #[macro_use ] |
| 21 | mod loongarch; |
| 22 | #[macro_use ] |
| 23 | mod s390x; |
| 24 | |
| 25 | cfg_select! { |
| 26 | any(target_arch = "x86" , target_arch = "x86_64" ) => { |
| 27 | #[stable (feature = "simd_x86" , since = "1.27.0" )] |
| 28 | pub use x86::*; |
| 29 | } |
| 30 | target_arch = "arm" => { |
| 31 | #[unstable(feature = "stdarch_arm_feature_detection" , issue = "111190" )] |
| 32 | pub use arm::*; |
| 33 | } |
| 34 | any(target_arch = "aarch64" , target_arch = "arm64ec" ) => { |
| 35 | #[stable(feature = "simd_aarch64" , since = "1.60.0" )] |
| 36 | pub use aarch64::*; |
| 37 | } |
| 38 | any(target_arch = "riscv32" , target_arch = "riscv64" ) => { |
| 39 | #[unstable(feature = "stdarch_riscv_feature_detection" , issue = "111192" )] |
| 40 | pub use riscv::*; |
| 41 | } |
| 42 | target_arch = "powerpc" => { |
| 43 | #[unstable(feature = "stdarch_powerpc_feature_detection" , issue = "111191" )] |
| 44 | pub use powerpc::*; |
| 45 | } |
| 46 | target_arch = "powerpc64" => { |
| 47 | #[unstable(feature = "stdarch_powerpc_feature_detection" , issue = "111191" )] |
| 48 | pub use powerpc64::*; |
| 49 | } |
| 50 | target_arch = "mips" => { |
| 51 | #[unstable(feature = "stdarch_mips_feature_detection" , issue = "111188" )] |
| 52 | pub use mips::*; |
| 53 | } |
| 54 | target_arch = "mips64" => { |
| 55 | #[unstable(feature = "stdarch_mips_feature_detection" , issue = "111188" )] |
| 56 | pub use mips64::*; |
| 57 | } |
| 58 | any(target_arch = "loongarch32" , target_arch = "loongarch64" ) => { |
| 59 | #[stable(feature = "stdarch_loongarch_feature" , since = "1.89.0" )] |
| 60 | pub use loongarch::*; |
| 61 | } |
| 62 | target_arch = "s390x" => { |
| 63 | #[stable(feature = "stdarch_s390x_feature_detection" , since = "1.93.0" )] |
| 64 | pub use s390x::*; |
| 65 | } |
| 66 | _ => { |
| 67 | // Unimplemented architecture: |
| 68 | #[doc(hidden)] |
| 69 | pub(crate) enum Feature { |
| 70 | Null |
| 71 | } |
| 72 | #[doc(hidden)] |
| 73 | #[unstable(feature = "stdarch_internal" , issue = "none" )] |
| 74 | pub mod __is_feature_detected {} |
| 75 | |
| 76 | impl Feature { |
| 77 | #[doc(hidden)] |
| 78 | pub(crate) fn from_str(_s: &str) -> Result<Feature, ()> { Err(()) } |
| 79 | #[doc(hidden)] |
| 80 | pub(crate) fn to_str(self) -> &'static str { "" } |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |