Style: Add uncrustify guards, fix asm (#136)

Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
This commit is contained in:
alfred gedeon 2020-08-24 15:32:02 -07:00 committed by GitHub
parent a038146915
commit 0afc048cf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 142 additions and 195 deletions

View file

@ -241,9 +241,7 @@ __asm void vPortSVCHandler( void )
ldr r1, [ r3 ]
ldr r0, [ r1 ]
/* Pop the core registers. */
ldmia r0 !, {
r4 - r11, r14
}
ldmia r0 !, { r4 - r11, r14 }
msr psp, r0
isb
mov r0, #0
@ -277,7 +275,7 @@ __asm void prvStartFirstTask( void )
dsb
isb
/* Call SVC to start the first task. */
svc 0
svc 0
nop
nop
/* *INDENT-ON* */
@ -455,21 +453,15 @@ __asm void xPortPendSVHandler( void )
/* Is the task using the FPU context? If so, push high vfp registers. */
tst r14, #0x10
it eq
vstmdbeq r0 !, {
s16 - s31
}
vstmdbeq r0 !, { s16 - s31 }
/* Save the core registers. */
stmdb r0 !, {
r4 - r11, r14
}
stmdb r0 !, { r4 - r11, r14 }
/* Save the new top of stack into the first member of the TCB. */
str r0, [ r2 ]
stmdb sp !, {
r0, r3
}
stmdb sp !, { r0, r3 }
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
cpsid i
msr basepri, r0
@ -479,37 +471,27 @@ __asm void xPortPendSVHandler( void )
bl vTaskSwitchContext
mov r0, #0
msr basepri, r0
ldmia sp !, {
r0, r3
}
ldmia sp !, { r0, r3 }
/* The first item in pxCurrentTCB is the task top of stack. */
ldr r1, [ r3 ]
ldr r0, [ r1 ]
/* Pop the core registers. */
ldmia r0 !, {
r4 - r11, r14
}
ldmia r0 !, { r4 - r11, r14 }
/* Is the task using the FPU context? If so, pop the high vfp registers
* too. */
tst r14, #0x10
it eq
vldmiaeq r0 !, {
s16 - s31
}
vldmiaeq r0 !, { s16 - s31 }
msr psp, r0
isb
#ifdef WORKAROUND_PMU_CM001 /* XMC4000 specific errata */
#if WORKAROUND_PMU_CM001 == 1
push {
r14
}
pop {
pc
}
push { r14 }
pop { pc }
nop
#endif
#endif

View file

@ -170,7 +170,9 @@
{
/* Barrier instructions are not used as this function is only used to
* lower the BASEPRI value. */
/* *INDENT-OFF* */
msr basepri, ulBASEPRI
/* *INDENT-ON* */
}
}
/*-----------------------------------------------------------*/
@ -183,11 +185,13 @@
{
/* Set BASEPRI to the max syscall priority to effect a critical
* section. */
/* *INDENT-OFF* */
cpsid i
msr basepri, ulNewBASEPRI
dsb
isb
cpsie i
/* *INDENT-ON* */
}
}
/*-----------------------------------------------------------*/
@ -199,7 +203,9 @@
/* Set BASEPRI to 0 so no interrupts are masked. This function is only
* used to lower the mask in an interrupt, so memory barriers are not
* used. */
/* *INDENT-OFF* */
msr basepri, # 0
/* *INDENT-ON* */
}
}
/*-----------------------------------------------------------*/
@ -212,12 +218,14 @@
{
/* Set BASEPRI to the max syscall priority to effect a critical
* section. */
/* *INDENT-OFF* */
mrs ulReturn, basepri
cpsid i
msr basepri, ulNewBASEPRI
dsb
isb
cpsie i
/* *INDENT-ON* */
}
return ulReturn;
@ -232,7 +240,9 @@
/* Obtain the number of the currently executing interrupt. */
__asm
{
/* *INDENT-OFF* */
mrs ulCurrentInterrupt, ipsr
/* *INDENT-ON* */
}
if( ulCurrentInterrupt == 0 )