Add clobber lists to inline asm code.

pull/4/head
Richard Barry 16 years ago
parent d3f5c5348c
commit 9c349886af

@ -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 * C portion of the SVC handler. The SVC handler is split between an asm entry
* and a C wrapper for simplicity of coding and maintenance. * and a C wrapper for simplicity of coding and maintenance.
*/ */
static void prvSVCHandler( unsigned long *pulRegisters ) __attribute__ ((optimize("3"))) PRIVILEGED_FUNCTION; static void prvSVCHandler( unsigned long *pulRegisters ) __attribute__(( noinline )) PRIVILEGED_FUNCTION;
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -196,6 +196,7 @@ void vPortSVCHandler( void )
" mrs r0, psp \n" " mrs r0, psp \n"
#endif #endif
" b prvSVCHandler \n" " b prvSVCHandler \n"
:::"r0"
); );
/* This will never get executed, but is required to prevent prvSVCHandler /* This will never get executed, but is required to prevent prvSVCHandler
@ -225,6 +226,7 @@ unsigned char ucSVCNumber;
" mrs r1, control \n" /* Obtain current control value. */ " mrs r1, control \n" /* Obtain current control value. */
" bic r1, #1 \n" /* Set privilege bit. */ " bic r1, #1 \n" /* Set privilege bit. */
" msr control, r1 \n" /* Write back new control value. */ " msr control, r1 \n" /* Write back new control value. */
:::"r1"
); );
break; break;

@ -103,7 +103,7 @@ extern "C" {
#define portNUM_CONFIGURABLE_REGIONS ( ( portLAST_CONFIGURABLE_REGION - portFIRST_CONFIGURABLE_REGION ) + 1 ) #define portNUM_CONFIGURABLE_REGIONS ( ( portLAST_CONFIGURABLE_REGION - portFIRST_CONFIGURABLE_REGION ) + 1 )
#define portTOTAL_NUM_REGIONS ( portNUM_CONFIGURABLE_REGIONS + 1 ) /* Plus one to make space for the stack region. */ #define portTOTAL_NUM_REGIONS ( portNUM_CONFIGURABLE_REGIONS + 1 ) /* Plus one to make space for the stack region. */
#define portSWITCH_TO_USER_MODE() __asm volatile ( " mrs r0, control \n orr r0, #1 \n msr control, r0 " ) #define portSWITCH_TO_USER_MODE() __asm volatile ( " mrs r0, control \n orr r0, #1 \n msr control, r0 " :::"r0" )
typedef struct MPU_REGION_REGISTERS typedef struct MPU_REGION_REGISTERS
{ {

Loading…
Cancel
Save