Add vPortInitialiseFPSCR API

This commit is contained in:
Rahul Kar 2024-07-08 16:54:13 +05:30
parent d37b605632
commit 886d1fd4ff
2 changed files with 12 additions and 9 deletions

View file

@ -319,7 +319,7 @@ void vPortTaskUsesFPU( void )
ulPortTaskHasFPUContext = pdTRUE;
/* Initialise the floating point status register. */
vSetupFPU();
vPortInitialiseFPSCR();
/*__asm volatile ( "FMXR FPSCR, %0" ::"r" ( ulInitialFPSCR ) : "memory" );*/
}
/*-----------------------------------------------------------*/

View file

@ -47,6 +47,7 @@
.global FreeRTOS_IRQ_Handler
.global FreeRTOS_SVC_Handler
.global vPortRestoreTaskContext
.global vPortInitialiseFPSCR
.macro portSAVE_CONTEXT
@ -150,14 +151,16 @@ vPortRestoreTaskContext:
CPS #SYS_MODE
portRESTORE_CONTEXT
/******************************************************************************
* vPortInitialiseFPSCR is used to initialize the FPSCR context.
*****************************************************************************/
.align 4
.type vSetupFPU, %function
vSetupFPU:
PUSH { R0 }
MOV R0, #0x0
FMXR FPSCR, R0
POP { R0 }
BX LR
.type vPortInitialiseFPSCR, %function
vPortInitialiseFPSCR:
MOV R0, #0
FMXR FPSCR, R0
BX LR
.align 4
.type FreeRTOS_IRQ_Handler, %function