Why is s0 / x8 suitable for values that survive calls?
s0-s11 are preserved across calls; a callee that modifies them must restore them, so callers can rely on their values after return.
s0 is a callee-saved register in the psABI: if a function modifies it, the function must restore it before returning. The psABI also says that if code uses a frame pointer, it must reside in x8, namely s0/fp.
The psABI marks s0-s11 as preserved across calls. A callee that modifies them must restore their entry values before returning. A frame pointer is optional; if present, the psABI requires it to reside in x8/s0.
s0 / x8 belongs to the s0-s11 saved-register group. The psABI marks it preserved across calls; a callee that modifies it must restore it before returning.
The standard psABI marks s0-s11 as preserved across calls.
A callee that modifies s* must restore its entry value before returning.
If a frame pointer exists, it must reside in x8/s0.
# s0 is a register preserved across calls
# A procedure that modifies s0 must restore its entry value before returnings0-s11 are preserved across calls; a callee that modifies them must restore them, so callers can rely on their values after return.
The callee restores it before returning.