From 886d1fd4ff1b3198453deef29d09005d00023b6b Mon Sep 17 00:00:00 2001 From: Rahul Kar Date: Mon, 8 Jul 2024 16:54:13 +0530 Subject: [PATCH] Add vPortInitialiseFPSCR API --- portable/GCC/ARM_CRx_No_GIC/port.c | 2 +- portable/GCC/ARM_CRx_No_GIC/portASM.S | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/portable/GCC/ARM_CRx_No_GIC/port.c b/portable/GCC/ARM_CRx_No_GIC/port.c index a3fb8e4a9..01cb9fdb6 100644 --- a/portable/GCC/ARM_CRx_No_GIC/port.c +++ b/portable/GCC/ARM_CRx_No_GIC/port.c @@ -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" );*/ } /*-----------------------------------------------------------*/ \ No newline at end of file diff --git a/portable/GCC/ARM_CRx_No_GIC/portASM.S b/portable/GCC/ARM_CRx_No_GIC/portASM.S index 42fd70939..253fb6a60 100644 --- a/portable/GCC/ARM_CRx_No_GIC/portASM.S +++ b/portable/GCC/ARM_CRx_No_GIC/portASM.S @@ -47,6 +47,7 @@ .global FreeRTOS_IRQ_Handler .global FreeRTOS_SVC_Handler .global vPortRestoreTaskContext + .global vPortInitialiseFPSCR .macro portSAVE_CONTEXT @@ -149,15 +150,17 @@ vPortRestoreTaskContext: /* Switch to system mode. */ 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