Skip to content

Commit 4987923

Browse files
japaricgnzlbg
authored andcommitted
acle: move saturating intrinsics into its own module
addresses #557 (comment)
1 parent cc9bf63 commit 4987923

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

crates/core_arch/src/acle/dsp.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! # References:
22
//!
33
//! - Section 8.3 "16-bit multiplications"
4-
//! - Section 8.4 "Saturating intrinsics"
54
//!
65
//! Intrinsics that could live here:
76
//!
@@ -11,8 +10,6 @@
1110
//! - __smultt
1211
//! - __smulwb
1312
//! - __smulwt
14-
//! - __ssat
15-
//! - __usat
1613
//! - __qadd
1714
//! - __qsub
1815
//! - __qdbl

crates/core_arch/src/acle/mod.rs

+13
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ mod dsp;
7979
))]
8080
pub use self::dsp::*;
8181

82+
// Supported arches: 6, 7-M. See Section 10.1 of ACLE (e.g. SSAT)
83+
#[cfg(all(
84+
not(target_arch = "aarch64"),
85+
target_feature = "v6",
86+
))]
87+
mod sat;
88+
89+
#[cfg(all(
90+
not(target_arch = "aarch64"),
91+
target_feature = "v6",
92+
))]
93+
pub use self::sat::*;
94+
8295
// Deprecated in ACLE 2.0 for the A profile but fully supported on the M and R profiles, says
8396
// Section 5.4.9 of ACLE. We'll expose these for the A profile even if deprecated
8497
#[cfg(all(

crates/core_arch/src/acle/sat.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//! # References:
2+
//!
3+
//! - Section 8.4 "Saturating intrinsics"
4+
//!
5+
//! Intrinsics that could live here:
6+
//!
7+
//! - __ssat
8+
//! - __usat

0 commit comments

Comments
 (0)