From 5bed907740253386c619285ab5e549572b150946 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 7 Jan 2021 18:12:21 +0100 Subject: Duplicate compiler fences around barrier instrs --- asm/inline.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'asm/inline.rs') diff --git a/asm/inline.rs b/asm/inline.rs index f2014f8..9150c9c 100644 --- a/asm/inline.rs +++ b/asm/inline.rs @@ -64,18 +64,21 @@ pub unsafe fn __delay(cyc: u32) { #[inline(always)] pub unsafe fn __dmb() { + compiler_fence(Ordering::SeqCst); asm!("dmb"); compiler_fence(Ordering::SeqCst); } #[inline(always)] pub unsafe fn __dsb() { + compiler_fence(Ordering::SeqCst); asm!("dsb"); compiler_fence(Ordering::SeqCst); } #[inline(always)] pub unsafe fn __isb() { + compiler_fence(Ordering::SeqCst); asm!("isb"); compiler_fence(Ordering::SeqCst); } -- cgit v1.2.3