]> git.sur5r.net Git - freertos/blobdiff - Source/portable/GCC/ARM_CM3_MPU/port.c
Add clobber lists to inline asm code.
[freertos] / Source / portable / GCC / ARM_CM3_MPU / port.c
index 155eb2708e33bd5b0ff66a0d8c373feeb59a7ec4..f689728ce119a611dbe3e973fafdcaedca8f032b 100644 (file)
@@ -81,8 +81,8 @@ task.h is included from an application file. */
 #define portPRIVILEGED_EXECUTION_START_ADDRESS ( 0UL )\r
 #define portMPU_REGION_VALID                                   ( 0x10UL )\r
 #define portMPU_REGION_ENABLE                                  ( 0x01UL )\r
-#define portPERIPHERALS_START_ADDRESS 0x40000000UL\r
-#define portPERIPHERALS_END_ADDRESS 0x5FFFFFFFUL\r
+#define portPERIPHERALS_START_ADDRESS                  0x40000000UL\r
+#define portPERIPHERALS_END_ADDRESS                            0x5FFFFFFFUL\r
 \r
 /* Constants required to access and manipulate the SysTick. */\r
 #define portNVIC_SYSTICK_CLK                                   ( 0x00000004UL )\r
@@ -149,7 +149,7 @@ static void prvRestoreContextOfFirstTask( void ) __attribute__(( naked )) PRIVIL
  * C portion of the SVC handler.  The SVC handler is split between an asm entry\r
  * and a C wrapper for simplicity of coding and maintenance.\r
  */\r
-static void prvSVCHandler(     unsigned long *pulRegisters ) __attribute__ ((optimize("3"))) PRIVILEGED_FUNCTION;\r
+static void prvSVCHandler( unsigned long *pulRegisters ) __attribute__(( noinline )) PRIVILEGED_FUNCTION;\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -196,6 +196,7 @@ void vPortSVCHandler( void )
                        "       mrs r0, psp                                             \n"\r
                #endif\r
                        "       b prvSVCHandler                                 \n"\r
+                       :::"r0"\r
        );\r
 \r
        /* This will never get executed, but is required to prevent prvSVCHandler\r
@@ -225,6 +226,7 @@ unsigned char ucSVCNumber;
                                                                                                "       mrs r1, control         \n" /* Obtain current control value. */\r
                                                                                                "       bic r1, #1                      \n" /* Set privilege bit. */\r
                                                                                                "       msr control, r1         \n" /* Write back new control value. */\r
+                                                                                               :::"r1"\r
                                                                                        );\r
                                                                                        break;\r
 \r