From a90ca447a44e30deb5ff879ae627e6a21f952dbc Mon Sep 17 00:00:00 2001 From: rtel Date: Thu, 25 Apr 2019 19:49:50 +0000 Subject: [PATCH] Added portMEMORY_BARRIER() implemented as __asm volatile( "" ::: "memory" ) into ARM Cortex-M33 ports to assist with link time optimisation. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2651 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Source/portable/ARMv8M/non_secure/portmacro.h | 2 ++ FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portmacro.h | 2 ++ .../Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portmacro.h b/FreeRTOS/Source/portable/ARMv8M/non_secure/portmacro.h index 4dede1716..3ab4ff700 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portmacro.h @@ -289,6 +289,8 @@ typedef struct MPU_SETTINGS #endif /* configENABLE_MPU */ /*-----------------------------------------------------------*/ +#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" ) + #ifdef __cplusplus } #endif diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portmacro.h index 4dede1716..3ab4ff700 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portmacro.h @@ -289,6 +289,8 @@ typedef struct MPU_SETTINGS #endif /* configENABLE_MPU */ /*-----------------------------------------------------------*/ +#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" ) + #ifdef __cplusplus } #endif diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h index 4dede1716..3ab4ff700 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h @@ -289,6 +289,8 @@ typedef struct MPU_SETTINGS #endif /* configENABLE_MPU */ /*-----------------------------------------------------------*/ +#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" ) + #ifdef __cplusplus } #endif -- 2.39.2