xiaoxiang781216 commented on code in PR #15876: URL: https://github.com/apache/nuttx/pull/15876#discussion_r1963046943
########## arch/arm/src/armv7-m/arm_fpuconfig.c: ########## @@ -83,3 +86,30 @@ void arm_fpuconfig(void) regval |= NVIC_CPACR_CP_FULL(10) | NVIC_CPACR_CP_FULL(11); putreg32(regval, NVIC_CPACR); } +#else +void arm_fpuconfig(void) +{ + uint32_t regval; + + /* Clear CONTROL.FPCA so that we do not get the extended context frame + * with the volatile FP registers stacked in the saved context. + */ + + regval = getcontrol(); + regval &= ~CONTROL_FPCA; + setcontrol(regval); + + /* Enable lazy stacking (LSPEN) and automatic state preservation (ASPEN). + */ + + regval = getreg32(NVIC_FPCCR); Review Comment: can we use one arm_fpuconfig but add #ifdef/#else/#endif into the code fragment? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org