Why is s6 / x22 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.
Callee-saved register 6 in the standard psABI; a callee that modifies it restores its entry value before returning.
The psABI marks s0-s11 as preserved across calls. A callee that modifies them must restore their entry values before returning. s6 has no frame-pointer alias; the optional frame-pointer rule applies only to x8/s0.
s6 / x22 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.
s6 has no frame-pointer alias.
# s6 is a register preserved across calls
# A procedure that modifies s6 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.