mirror of
https://github.com/apache/nuttx.git
synced 2026-08-31 22:23:03 +00:00
To fix a fpu illegal instruction exception due to fcsr have invalid rounding-mode, restore fcsr/f0~f31 with a random value from stack because fpu context is not save into stack when mstatus.fs is clean(not dirty). The number of save/restore fpu context operations is not equal. In fact, CONFIG_ARCH_LAZYFPU is a performance optimization mechanism aimed at minimizing the saving and restoring of FPU registers. In some cases, it may only need to be saved once but must be restored multiple times. Therefore, this optimization mechanism dictates that saving cannot be done on the stack; it must be stored at a fixed location(e.g. task control block buffer), as the stack requires push/pop operations to be matched. In case of that CONFIG_ARCH_LAZYFPU is off, save/restore FPU registers always into stack to avoid the above issues. Signed-off-by: Jinliang Li <lijinliang1@lixiang.com> |
||
|---|---|---|
| .. | ||
| arm | ||
| arm64 | ||
| avr | ||
| ceva | ||
| dummy | ||
| hc | ||
| mips | ||
| misoc | ||
| or1k | ||
| renesas | ||
| risc-v | ||
| sim | ||
| sparc | ||
| tricore | ||
| x86 | ||
| x86_64 | ||
| xtensa | ||
| z16 | ||
| z80 | ||
| CMakeLists.txt | ||
| Kconfig | ||