1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 02:27:44 +00:00

LibC: Save callee-saved floating-point registers in setjmp for riscv64

This commit is contained in:
Sönke Holz 2024-02-21 18:18:14 +01:00 committed by Jelle Raaijmakers
parent 420c54a21b
commit a203837b1f
2 changed files with 34 additions and 5 deletions

View file

@ -33,6 +33,7 @@ struct __jmp_buf {
uint64_t regs[22];
#elif defined(__riscv) && __riscv_xlen == 64
uint64_t s[12];
uint64_t fs[12];
uint64_t sp;
uint64_t ra;
#else
@ -54,7 +55,7 @@ static_assert(sizeof(struct __jmp_buf) == 72, "struct __jmp_buf unsynchronized w
# elif defined(__aarch64__)
static_assert(sizeof(struct __jmp_buf) == 184, "struct __jmp_buf unsynchronized with aarch64/setjmp.S");
# elif defined(__riscv) && __riscv_xlen == 64
static_assert(sizeof(struct __jmp_buf) == 120, "struct __jmp_buf unsynchronized with riscv64/setjmp.S");
static_assert(sizeof(struct __jmp_buf) == 216, "struct __jmp_buf unsynchronized with riscv64/setjmp.S");
# else
# error "Unknown architecture"
# endif