Add tracking issue for ARM barrier intrinsics
This commit is contained in:
parent
bd54f94098
commit
736da66780
6 changed files with 29 additions and 25 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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<A>(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<A>(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<A>(arg: A)
|
||||
where
|
||||
A: super::sealed::Isb,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue