mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
riscv/riscv_fpu: Clear the full FPU status/control register on boot
Instead of clearing the fields individually, just wipe the whole register.
This can be done because flags and rm are just parts of the fcsr.
31 8 5 0
+--------------+--------+-----------+
| | | |
| RESERVED | FRM | FSTATUS |
| | | |
+--------------+--------+-----------+
FCSR
This commit is contained in:
@@ -69,8 +69,7 @@ riscv_fpuconfig:
|
|||||||
li a0, MSTATUS_FS_INIT
|
li a0, MSTATUS_FS_INIT
|
||||||
csrs CSR_STATUS, a0
|
csrs CSR_STATUS, a0
|
||||||
|
|
||||||
fsflags zero
|
fscsr zero
|
||||||
fsrm zero
|
|
||||||
|
|
||||||
fence.i
|
fence.i
|
||||||
ret
|
ret
|
||||||
|
|||||||
Reference in New Issue
Block a user