]> git.sur5r.net Git - freertos/commitdiff
Add clobber lists to inline asm code.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 6 Oct 2009 08:48:34 +0000 (08:48 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 6 Oct 2009 08:48:34 +0000 (08:48 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@911 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/GCC/ARM_CM3_MPU/port.c
Source/portable/GCC/ARM_CM3_MPU/portmacro.h

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
index 02c1adbd3787062aec2989a239ab98ee09d756b1..8aa2a5fe20c0664ad2a01eafd4f46cae680e2a5c 100644 (file)
@@ -103,7 +103,7 @@ extern "C" {
 #define portNUM_CONFIGURABLE_REGIONS           ( ( portLAST_CONFIGURABLE_REGION - portFIRST_CONFIGURABLE_REGION ) + 1 )\r
 #define portTOTAL_NUM_REGIONS                          ( portNUM_CONFIGURABLE_REGIONS + 1 ) /* Plus one to make space for the stack region. */\r
 \r
-#define portSWITCH_TO_USER_MODE() __asm volatile ( " mrs r0, control \n orr r0, #1 \n msr control, r0 " )\r
+#define portSWITCH_TO_USER_MODE() __asm volatile ( " mrs r0, control \n orr r0, #1 \n msr control, r0 " :::"r0" )\r
 \r
 typedef struct MPU_REGION_REGISTERS\r
 {\r