arm: Add ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS

This commit is contained in:
Sebastian Huber
2014-06-02 13:48:58 +02:00
parent 606ed52568
commit 7c90670c81
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -42,6 +42,7 @@ extern "C" {
|| defined(__ARM_ARCH_7M__)
#define ARM_MULTILIB_HAS_WFI
#define ARM_MULTILIB_HAS_LOAD_STORE_EXCLUSIVE
#define ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
#endif
#if defined(__ARM_ARCH_7A__) \
+6
View File
@@ -301,17 +301,23 @@ extern uint32_t arm_cpu_mode;
static inline void _ARM_Data_memory_barrier( void )
{
#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
__asm__ volatile ( "dmb" : : : "memory" );
#endif
}
static inline void _ARM_Data_synchronization_barrier( void )
{
#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
__asm__ volatile ( "dsb" : : : "memory" );
#endif
}
static inline void _ARM_Instruction_synchronization_barrier( void )
{
#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
__asm__ volatile ( "isb" : : : "memory" );
#endif
}
static inline uint32_t arm_interrupt_disable( void )