From 5aee8541c792cd5f97f0e6a4013011d815bd787a Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 13 Feb 2019 20:05:32 +0100 Subject: [PATCH] acle: move saturating intrinsics into its own module addresses https://github.com/rust-lang-nursery/stdsimd/pull/557#discussion_r255312560 --- library/stdarch/crates/core_arch/src/acle/dsp.rs | 3 --- library/stdarch/crates/core_arch/src/acle/mod.rs | 13 +++++++++++++ library/stdarch/crates/core_arch/src/acle/sat.rs | 8 ++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 library/stdarch/crates/core_arch/src/acle/sat.rs diff --git a/library/stdarch/crates/core_arch/src/acle/dsp.rs b/library/stdarch/crates/core_arch/src/acle/dsp.rs index 4029e7aaa31e..31817ea87031 100644 --- a/library/stdarch/crates/core_arch/src/acle/dsp.rs +++ b/library/stdarch/crates/core_arch/src/acle/dsp.rs @@ -1,7 +1,6 @@ //! # References: //! //! - Section 8.3 "16-bit multiplications" -//! - Section 8.4 "Saturating intrinsics" //! //! Intrinsics that could live here: //! @@ -11,8 +10,6 @@ //! - __smultt //! - __smulwb //! - __smulwt -//! - __ssat -//! - __usat //! - __qadd //! - __qsub //! - __qdbl diff --git a/library/stdarch/crates/core_arch/src/acle/mod.rs b/library/stdarch/crates/core_arch/src/acle/mod.rs index d173246511fd..f1be11b27ba6 100644 --- a/library/stdarch/crates/core_arch/src/acle/mod.rs +++ b/library/stdarch/crates/core_arch/src/acle/mod.rs @@ -79,6 +79,19 @@ mod dsp; ))] pub use self::dsp::*; +// Supported arches: 6, 7-M. See Section 10.1 of ACLE (e.g. SSAT) +#[cfg(all( + not(target_arch = "aarch64"), + target_feature = "v6", +))] +mod sat; + +#[cfg(all( + not(target_arch = "aarch64"), + target_feature = "v6", +))] +pub use self::sat::*; + // Deprecated in ACLE 2.0 for the A profile but fully supported on the M and R profiles, says // Section 5.4.9 of ACLE. We'll expose these for the A profile even if deprecated #[cfg(all( diff --git a/library/stdarch/crates/core_arch/src/acle/sat.rs b/library/stdarch/crates/core_arch/src/acle/sat.rs new file mode 100644 index 000000000000..38c98d7342e3 --- /dev/null +++ b/library/stdarch/crates/core_arch/src/acle/sat.rs @@ -0,0 +1,8 @@ +//! # References: +//! +//! - Section 8.4 "Saturating intrinsics" +//! +//! Intrinsics that could live here: +//! +//! - __ssat +//! - __usat