mirror of
https://github.com/apache/nuttx.git
synced 2026-10-10 15:50:23 +00:00
arch_setjmp.S stores d8-d15 only under CONFIG_ARCH_FPU, but it did not include nuttx/config.h. So setjmp() never saved these registers and longjmp() never restored them. They are callee-saved (AAPCS64), so a function that kept a value in one of them could see it change after a longjmp(). Include nuttx/config.h. The assembly then stores d8-d15, eight bytes each, at offsets 112 to 176. struct setjmp_buf_s declared them as eight 4-byte floats, 32 bytes short, so declare them as uint64_t too. jmp_buf is now 176 bytes with the FPU, and its layout matches the assembly. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .. | ||
| arch_elf.c | ||
| arch_mcount.c | ||
| arch_memchr.S | ||
| arch_memcmp.S | ||
| arch_memcpy.S | ||
| arch_memmove.S | ||
| arch_memset.S | ||
| arch_setjmp.S | ||
| arch_strchr.S | ||
| arch_strchrnul.S | ||
| arch_strcmp.S | ||
| arch_strcpy.S | ||
| arch_strlen.S | ||
| arch_strncmp.S | ||
| arch_strnlen.S | ||
| arch_strrchr.S | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Make.defs | ||