From 39cf561086fb82d6a75ad21a014e4796b5b00818 Mon Sep 17 00:00:00 2001 From: kar-rahul-aws Date: Tue, 16 Jul 2024 10:47:34 +0530 Subject: [PATCH] Revert removal of configFPU_D32 --- portable/GCC/ARM_CRx_No_GIC/port.c | 6 +++++- portable/GCC/ARM_CRx_No_GIC/portASM.S | 3 +++ portable/GCC/ARM_CRx_No_GIC/portmacro.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/portable/GCC/ARM_CRx_No_GIC/port.c b/portable/GCC/ARM_CRx_No_GIC/port.c index 90612ce58..bd5a19a49 100644 --- a/portable/GCC/ARM_CRx_No_GIC/port.c +++ b/portable/GCC/ARM_CRx_No_GIC/port.c @@ -82,7 +82,11 @@ #endif /* The space on the stack required to hold the FPU registers. */ -#define portFPU_REGISTER_WORDS ( ( 16 * 2 ) + 1 ) /* D0-D15 and FPSCR. */ +#if ( configFPU_D32 == 1 ) + #define portFPU_REGISTER_WORDS ( ( 32 * 2 ) + 1 ) /* D0-D31 and FPSCR. */ +#else + #define portFPU_REGISTER_WORDS ( ( 16 * 2 ) + 1 ) /* D0-D15 and FPSCR. */ +#endif /* configFPU_D32 */ /*-----------------------------------------------------------*/ diff --git a/portable/GCC/ARM_CRx_No_GIC/portASM.S b/portable/GCC/ARM_CRx_No_GIC/portASM.S index 57bd3fcf4..9945fc2d9 100644 --- a/portable/GCC/ARM_CRx_No_GIC/portASM.S +++ b/portable/GCC/ARM_CRx_No_GIC/portASM.S @@ -80,6 +80,9 @@ /* Save the floating point context, if any. */ VMRSNE R1, FPSCR VPUSHNE {D0-D15} +#if configFPU_D32 == 1 + VPUSHNE {D16-D31} +#endif /* configFPU_D32 */ PUSHNE {R1} /* Save ulPortTaskHasFPUContext itself. */ diff --git a/portable/GCC/ARM_CRx_No_GIC/portmacro.h b/portable/GCC/ARM_CRx_No_GIC/portmacro.h index 6106dea4a..b29bd9be1 100644 --- a/portable/GCC/ARM_CRx_No_GIC/portmacro.h +++ b/portable/GCC/ARM_CRx_No_GIC/portmacro.h @@ -150,7 +150,7 @@ UBaseType_t ulPortCountLeadingZeros( UBaseType_t ulBitmap ); void vPortTaskUsesFPU( void ); #else /* Each task has an FPU context already, so define this function as a - *no-op. */ + * no-op. */ #define vPortTaskUsesFPU() #endif #define portTASK_USES_FLOATING_POINT() vPortTaskUsesFPU()