Definition
s0 / fp ( RISC-V)
s0is the RISC-V integer registerx8, serving dual roles as a saved register and, in non-optimised code, as the frame pointer. It is callee-saved according to the RISC-V calling convention.As a saved register,
s0must preserve its value across function calls. As a frame pointer, it provides a stable base reference for accessing local variables and function arguments within a stack frame, enabling debugging and non-optimised code to locate values at constant offsets fromfp.