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

LibC: Implement setjmp and longjmp for riscv64

The assembly implementation is based on the x86_64 version.
This commit is contained in:
Sönke Holz 2024-01-14 11:47:37 +01:00 committed by Andrew Kaster
parent 5825eaa264
commit a504d76b14
2 changed files with 82 additions and 12 deletions

View file

@ -32,10 +32,9 @@ struct __jmp_buf {
// FIXME: This is likely incorrect.
uint64_t regs[22];
#elif defined(__riscv) && __riscv_xlen == 64
// FIXME: This is likely incorrect.
uint64_t s[12];
uint64_t sp;
uint64_t pc;
uint64_t ra;
#else
# error "Unknown architecture"
#endif