mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
First update of vPortTaskUsesFPU API
This commit is contained in:
parent
0452603a94
commit
d37b605632
|
@ -312,13 +312,14 @@ void FreeRTOS_Tick_Handler( void )
|
||||||
|
|
||||||
void vPortTaskUsesFPU( void )
|
void vPortTaskUsesFPU( void )
|
||||||
{
|
{
|
||||||
uint32_t ulInitialFPSCR = 0;
|
//uint32_t ulInitialFPSCR = 0;
|
||||||
|
|
||||||
/* A task is registering the fact that it needs an FPU context. Set the
|
/* A task is registering the fact that it needs an FPU context. Set the
|
||||||
* FPU flag (which is saved as part of the task context). */
|
* FPU flag (which is saved as part of the task context). */
|
||||||
ulPortTaskHasFPUContext = pdTRUE;
|
ulPortTaskHasFPUContext = pdTRUE;
|
||||||
|
|
||||||
/* Initialise the floating point status register. */
|
/* Initialise the floating point status register. */
|
||||||
__asm volatile ( "FMXR FPSCR, %0" ::"r" ( ulInitialFPSCR ) : "memory" );
|
vSetupFPU();
|
||||||
|
/*__asm volatile ( "FMXR FPSCR, %0" ::"r" ( ulInitialFPSCR ) : "memory" );*/
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
|
@ -149,6 +149,15 @@ vPortRestoreTaskContext:
|
||||||
/* Switch to system mode. */
|
/* Switch to system mode. */
|
||||||
CPS #SYS_MODE
|
CPS #SYS_MODE
|
||||||
portRESTORE_CONTEXT
|
portRESTORE_CONTEXT
|
||||||
|
|
||||||
|
.align 4
|
||||||
|
.type vSetupFPU, %function
|
||||||
|
vSetupFPU:
|
||||||
|
PUSH { R0 }
|
||||||
|
MOV R0, #0x0
|
||||||
|
FMXR FPSCR, R0
|
||||||
|
POP { R0 }
|
||||||
|
BX LR
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
.type FreeRTOS_IRQ_Handler, %function
|
.type FreeRTOS_IRQ_Handler, %function
|
||||||
|
|
Loading…
Reference in a new issue