nuttx/libs
Marco Casaroli f0669ebd59 arch/arm64: Save d8-d15 in setjmp() and make jmp_buf hold them.
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>
2026-10-09 06:11:29 -03:00
..
libbuiltin !sched/arch/libc: Give fork() and vfork() their real, separate semantics. 2026-08-10 08:57:30 -03:00
libc arch/arm64: Save d8-d15 in setjmp() and make jmp_buf hold them. 2026-10-09 06:11:29 -03:00
libdsp tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
libm cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
libnx sched/semaphore: Remove the return value check of nxsem_init/nxmutex_init 2026-09-25 10:37:43 +02:00
libxx cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
CMakeLists.txt libs: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00