risc-v

Definition

s0 / fp ( RISC-V)

s0 is the RISC-V integer register x8, 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, s0 must 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 from fp.