Skip to content

Commit ac5493a

Browse files
japaricgnzlbg
authored andcommitted
acle/dsp: note the difference between LLVM's +dsp and ACLE's __ARM_FEATURE_DSP
addresses #557 (comment)
1 parent c1a95e6 commit ac5493a

File tree

1 file changed

+10
-0
lines changed
  • crates/core_arch/src/acle

1 file changed

+10
-0
lines changed

crates/core_arch/src/acle/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@
3333
//! - `v6 < v8m < v6t2`
3434
//! - `v7 < v8m.main`
3535
//!
36+
//! *NOTE*: Section 5.4.7 of ACLE says:
37+
//!
38+
//! - "__ARM_FEATURE_DSP is defined to 1 if the DSP (v5E) instructions are supported and the
39+
//! intrinsics defined in Saturating intrinsics are available."
40+
//!
41+
//! This does *not* match how LLVM uses the '+dsp' feature; this feature is not set for v5te
42+
//! targets so we have to work around this difference.
43+
//!
3644
//! # References
3745
//!
3846
//! - [ACLE Q2 2018](https://developer.arm.com/docs/101028/latest)
@@ -54,6 +62,8 @@ pub use self::registers::*;
5462
// Supported arches: 5TE, 7E-M. See Section 10.1 of ACLE (e.g. QADD)
5563
// We also include the A profile even though DSP is deprecated on that profile as of ACLE 2.0 (see
5664
// section 5.4.7)
65+
// Here we workaround the difference between LLVM's +dsp and ACLE's __ARM_FEATURE_DSP by gating on
66+
// '+v5te' rather than on '+dsp'
5767
#[cfg(all(
5868
not(target_arch = "aarch64"),
5969
any(

0 commit comments

Comments
 (0)