callee-saved
A register that must hold the same value after a call as before; a function that wants to use it must save it first and put it back before returning.
Callee-saved (non-volatile, call-preserved) registers are preserved across calls by the called function; on x86-64 Linux and macOS rbx, rbp, r12-r15, rsp; 64-bit Windows adds rdi and rsi; on ARM64 x19-x28, x29, sp; on RISC-V s0-s11, sp.
Examples
On x86-64 System V, a function that uses
rbxmust restore it before returning. ARM64's callee-saved registers arex19tox28.
See also