nuttx/arch
Jinliang Li 5ce0e93637 arch/risc-v: save/restore fpu registers always when CONFIG_ARCH_LAZYFPU is off
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>
2025-04-27 13:08:29 +08:00
..
arm arch/arm/rp23xx: fix irq priority levels 2025-04-22 20:59:42 -03:00
arm64 net: use bps units for bitrate in SocketCAN interfaces. 2025-04-16 11:07:27 -03:00
avr arch/avr: fixed PC load on chips with more than 128kB program memory 2025-04-27 13:07:45 +08:00
ceva libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
dummy
hc Revert "Use small lock to protect resources related to irq in arch avr, hc, mips and or1k." 2025-02-13 14:15:43 +08:00
mips libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
misoc libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
or1k libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
renesas Revert "Use small lock to protect usbdev and endpoint in arch renesas." 2025-02-13 14:15:43 +08:00
risc-v arch/risc-v: save/restore fpu registers always when CONFIG_ARCH_LAZYFPU is off 2025-04-27 13:08:29 +08:00
sim libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
sparc libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
tricore libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
x86 libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
x86_64 libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
xtensa arch/xtensa: fix build errors related to data types on ESP32|S2|S3 2025-04-18 09:32:58 +08:00
z16 libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
z80 libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
CMakeLists.txt arch/z80: migrate to SPDX identifier 2024-12-02 17:23:25 +08:00
Kconfig libc/arm: optimize crc32/crc32c for arm 2025-04-04 09:51:50 -03:00