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

@ -218,9 +218,7 @@ __asm void vPortSVCHandler( void )
ldr r3, = pxCurrentTCB /* Restore the context. */
ldr r1, [ r3 ] /* Use pxCurrentTCBConst to get the pxCurrentTCB address. */
ldr r0, [ r1 ] /* The first item in pxCurrentTCB is the task top of stack. */
ldmia r0 !, {
r4 - r11
} /* Pop the registers that are not automatically saved on exception entry and the critical nesting count. */
ldmia r0 !, { r4 - r11 } /* Pop the registers that are not automatically saved on exception entry and the critical nesting count. */
msr psp, r0 /* Restore the task stack pointer. */
isb
mov r0, # 0
@ -237,7 +235,7 @@ __asm void prvStartFirstTask( void )
PRESERVE8
/* Use the NVIC offset register to locate the stack. */
ldr r0, = 0xE000ED08
ldr r0, =0xE000ED08
ldr r0, [ r0 ]
ldr r0, [ r0 ]
@ -400,14 +398,10 @@ __asm void xPortPendSVHandler( void )
ldr r3, =pxCurrentTCB /* Get the location of the current TCB. */
ldr r2, [ r3 ]
stmdb r0 !, {
r4 - r11
} /* Save the remaining registers. */
stmdb r0 !, { r4 - r11 } /* Save the remaining registers. */
str r0, [ r2 ] /* Save the new top of stack into the first member of the TCB. */
stmdb sp !, {
r3, r14
}
stmdb sp !, { r3, r14 }
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
msr basepri, r0
dsb
@ -415,15 +409,11 @@ __asm void xPortPendSVHandler( void )
bl vTaskSwitchContext
mov r0, #0
msr basepri, r0
ldmia sp !, {
r3, r14
}
ldmia sp !, { r3, r14 }
ldr r1, [ r3 ]
ldr r0, [ r1 ] /* The first item in pxCurrentTCB is the task top of stack. */
ldmia r0 !, {
r4 - r11
} /* Pop the registers and the critical nesting count. */
ldmia r0 !, { r4 - r11 } /* Pop the registers and the critical nesting count. */
msr psp, r0
isb
bx r14