From 736da6678022654ebdecf523d156ea44750ff282 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 26 Oct 2023 12:56:06 +0100 Subject: [PATCH] Add tracking issue for ARM barrier intrinsics --- .../src/arm_shared/barrier/common.rs | 2 ++ .../core_arch/src/arm_shared/barrier/cp15.rs | 4 +++ .../core_arch/src/arm_shared/barrier/mod.rs | 8 +++++ .../src/arm_shared/barrier/not_mclass.rs | 7 +++++ .../core_arch/src/arm_shared/barrier/v8.rs | 4 +++ .../crates/core_arch/src/arm_shared/mod.rs | 29 +++---------------- 6 files changed, 29 insertions(+), 25 deletions(-) diff --git a/library/stdarch/crates/core_arch/src/arm_shared/barrier/common.rs b/library/stdarch/crates/core_arch/src/arm_shared/barrier/common.rs index 0fb35534d169..476a07ffaef9 100644 --- a/library/stdarch/crates/core_arch/src/arm_shared/barrier/common.rs +++ b/library/stdarch/crates/core_arch/src/arm_shared/barrier/common.rs @@ -2,10 +2,12 @@ /// Full system is the required shareability domain, reads and writes are the /// required access types +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct SY; dmb_dsb!(SY); +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] impl super::super::sealed::Isb for SY { #[inline(always)] unsafe fn __isb(&self) { diff --git a/library/stdarch/crates/core_arch/src/arm_shared/barrier/cp15.rs b/library/stdarch/crates/core_arch/src/arm_shared/barrier/cp15.rs index fe540a7d8dc7..ae9ce3c005cd 100644 --- a/library/stdarch/crates/core_arch/src/arm_shared/barrier/cp15.rs +++ b/library/stdarch/crates/core_arch/src/arm_shared/barrier/cp15.rs @@ -5,8 +5,10 @@ use crate::arch::asm; /// Full system is the required shareability domain, reads and writes are the /// required access types +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct SY; +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] impl super::super::sealed::Dmb for SY { #[inline(always)] unsafe fn __dmb(&self) { @@ -18,6 +20,7 @@ impl super::super::sealed::Dmb for SY { } } +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] impl super::super::sealed::Dsb for SY { #[inline(always)] unsafe fn __dsb(&self) { @@ -29,6 +32,7 @@ impl super::super::sealed::Dsb for SY { } } +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] impl super::super::sealed::Isb for SY { #[inline(always)] unsafe fn __isb(&self) { diff --git a/library/stdarch/crates/core_arch/src/arm_shared/barrier/mod.rs b/library/stdarch/crates/core_arch/src/arm_shared/barrier/mod.rs index 6ccced00e3ce..1956a3240862 100644 --- a/library/stdarch/crates/core_arch/src/arm_shared/barrier/mod.rs +++ b/library/stdarch/crates/core_arch/src/arm_shared/barrier/mod.rs @@ -26,6 +26,7 @@ pub use self::cp15::*; ))] macro_rules! dmb_dsb { ($A:ident) => { + #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] impl super::super::sealed::Dmb for $A { #[inline(always)] unsafe fn __dmb(&self) { @@ -33,6 +34,7 @@ macro_rules! dmb_dsb { } } + #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] impl super::super::sealed::Dsb for $A { #[inline(always)] unsafe fn __dsb(&self) { @@ -54,18 +56,21 @@ mod common; target_feature = "v7", target_feature = "mclass" ))] +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub use self::common::*; #[cfg(any(target_arch = "aarch64", target_feature = "v7",))] mod not_mclass; #[cfg(any(target_arch = "aarch64", target_feature = "v7",))] +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub use self::not_mclass::*; #[cfg(target_arch = "aarch64")] mod v8; #[cfg(target_arch = "aarch64")] +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub use self::v8::*; /// Generates a DMB (data memory barrier) instruction or equivalent CP15 instruction. @@ -79,6 +84,7 @@ pub use self::v8::*; /// /// The __dmb() intrinsic also acts as a compiler memory barrier of the appropriate type. #[inline(always)] +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub unsafe fn __dmb(arg: A) where A: super::sealed::Dmb, @@ -94,6 +100,7 @@ where /// /// The __dsb() intrinsic also acts as a compiler memory barrier of the appropriate type. #[inline(always)] +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub unsafe fn __dsb(arg: A) where A: super::sealed::Dsb, @@ -115,6 +122,7 @@ where /// The only supported argument for the __isb() intrinsic is 15, corresponding to the SY (full /// system) scope of the ISB instruction. #[inline(always)] +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub unsafe fn __isb(arg: A) where A: super::sealed::Isb, diff --git a/library/stdarch/crates/core_arch/src/arm_shared/barrier/not_mclass.rs b/library/stdarch/crates/core_arch/src/arm_shared/barrier/not_mclass.rs index 385e1d5289a9..3b941b2715ef 100644 --- a/library/stdarch/crates/core_arch/src/arm_shared/barrier/not_mclass.rs +++ b/library/stdarch/crates/core_arch/src/arm_shared/barrier/not_mclass.rs @@ -2,42 +2,49 @@ /// Full system is the required shareability domain, writes are the required /// access type +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct ST; dmb_dsb!(ST); /// Inner Shareable is the required shareability domain, reads and writes are /// the required access types +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct ISH; dmb_dsb!(ISH); /// Inner Shareable is the required shareability domain, writes are the required /// access type +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct ISHST; dmb_dsb!(ISHST); /// Non-shareable is the required shareability domain, reads and writes are the /// required access types +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct NSH; dmb_dsb!(NSH); /// Non-shareable is the required shareability domain, writes are the required /// access type +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct NSHST; dmb_dsb!(NSHST); /// Outer Shareable is the required shareability domain, reads and writes are /// the required access types +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct OSH; dmb_dsb!(OSH); /// Outer Shareable is the required shareability domain, writes are the required /// access type +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct OSHST; dmb_dsb!(OSHST); diff --git a/library/stdarch/crates/core_arch/src/arm_shared/barrier/v8.rs b/library/stdarch/crates/core_arch/src/arm_shared/barrier/v8.rs index db15da805d65..5bf757f9f779 100644 --- a/library/stdarch/crates/core_arch/src/arm_shared/barrier/v8.rs +++ b/library/stdarch/crates/core_arch/src/arm_shared/barrier/v8.rs @@ -1,23 +1,27 @@ /// Full system is the required shareability domain, reads are the required /// access type +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct LD; dmb_dsb!(LD); /// Inner Shareable is the required shareability domain, reads are the required /// access type +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct ISHLD; dmb_dsb!(ISHLD); /// Non-shareable is the required shareability domain, reads are the required /// access type +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct NSHLD; dmb_dsb!(NSHLD); /// Outer Shareable is the required shareability domain, reads are the required /// access type +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub struct OSHLD; dmb_dsb!(OSHLD); diff --git a/library/stdarch/crates/core_arch/src/arm_shared/mod.rs b/library/stdarch/crates/core_arch/src/arm_shared/mod.rs index 0bc8cf143da2..ca5b3a646535 100644 --- a/library/stdarch/crates/core_arch/src/arm_shared/mod.rs +++ b/library/stdarch/crates/core_arch/src/arm_shared/mod.rs @@ -53,7 +53,7 @@ // 8, 7 and 6-M are supported via dedicated instructions like DMB. All other arches are supported // via CP15 instructions. See Section 10.1 of ACLE mod barrier; - +#[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub use self::barrier::*; mod hints; @@ -102,39 +102,18 @@ pub use self::neon::*; pub(crate) mod test_support; mod sealed { + #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub trait Dmb { unsafe fn __dmb(&self); } + #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub trait Dsb { unsafe fn __dsb(&self); } + #[unstable(feature = "stdarch_arm_barrier", issue = "117219")] pub trait Isb { unsafe fn __isb(&self); } - - pub trait Rsr { - unsafe fn __rsr(&self) -> u32; - } - - pub trait Rsr64 { - unsafe fn __rsr64(&self) -> u64; - } - - pub trait Rsrp { - unsafe fn __rsrp(&self) -> *const u8; - } - - pub trait Wsr { - unsafe fn __wsr(&self, value: u32); - } - - pub trait Wsr64 { - unsafe fn __wsr64(&self, value: u64); - } - - pub trait Wsrp { - unsafe fn __wsrp(&self, value: *const u8); - } }