You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pussuw (via GitHub)" <gi...@apache.org> on 2023/05/05 21:24:03 UTC
[GitHub] [nuttx] pussuw commented on a diff in pull request #9103: arch/riscv: Fixed FPU register error
pussuw commented on code in PR #9103:
URL: https://github.com/apache/nuttx/pull/9103#discussion_r1186509924
##########
arch/risc-v/src/common/riscv_macros.S:
##########
@@ -227,8 +222,15 @@
REGLOAD t0, REG_INT_CTX(\out)
li t1, MSTATUS_FS
and t2, t0, t1
- li t1, MSTATUS_FS_INIT
- ble t2, t1, 1f
+ li t1, MSTATUS_FS_DIRTY
+ bne t2, t1, 1f
+
+ /* Reset FS bit to MSTATUS_FS_CLEAN */
+ li t1, MSTATUS_FS_CLEAN
Review Comment:
Would it be possible to save FPU registers into the tcb again and save/restore FPU state only when a switch out/in happens?
--
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