You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/07 09:51:37 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6001: arm/armv[7|8]-m: skip the fpu save/restore if stack frame is integer-only
xiaoxiang781216 commented on code in PR #6001:
URL: https://github.com/apache/incubator-nuttx/pull/6001#discussion_r844874217
##########
arch/arm/src/armv7-m/gnu/arm_exception.S:
##########
@@ -176,6 +180,10 @@ exception_common:
vstmdb sp!, {s16-s31} /* Save the non-volatile FP context */
+ b end_fp_save
+skip_fp_save:
Review Comment:
let's keep use the local label(e.g. 2:, 3) like the original code.
##########
arch/arm/src/armv7-m/gnu/arm_exception.S:
##########
@@ -225,7 +233,15 @@ exception_common:
ldmia r0!, {r2-r11,r14} /* Recover R4-R11, r14 + 2 temp values */
#ifdef CONFIG_ARCH_FPU
- vldmia r0!, {s16-s31} /* Recover S16-S31 */
+ /* Switched-in task including volatile FP registers ? */
+
+ tst r14, #EXC_RETURN_STD_CONTEXT
+ bne skip_fp_restore
+
+ vldmia r0, {s16-s31} /* Recover S16-S31 */
+
+skip_fp_restore:
Review Comment:
ditto
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org