mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 11:53:53 -04:00
Style: Add uncrustify guards, fix asm (#136)
Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
This commit is contained in:
parent
a038146915
commit
0afc048cf2
11 changed files with 142 additions and 195 deletions
|
@ -244,12 +244,10 @@ __asm void vPortSVCHandler( void )
|
|||
|
||||
/* Get the location of the current TCB. */
|
||||
ldr r3, = pxCurrentTCB
|
||||
ldr r1, [ r3 ]
|
||||
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
|
||||
|
@ -300,7 +298,7 @@ __asm void prvEnableVFP( void )
|
|||
ldr r1, [ r0 ]
|
||||
|
||||
/* Enable CP10 and CP11 coprocessors, then save back. */
|
||||
orr r1, r1, # ( 0xf << 20 )
|
||||
orr r1, r1, #( 0xf << 20 )
|
||||
str r1, [ r0 ]
|
||||
bx r14
|
||||
nop
|
||||
|
@ -470,21 +468,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
|
||||
msr basepri, r0
|
||||
dsb
|
||||
|
@ -492,37 +484,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue