> Why shouldn't the caller save all the registers it needs instead of relying on the good behavior of the callee?
The cost to save a register is non-zero so it's helpful to have some registers the caller doesn't have to preserve and that don't need to be saved by the callee if it won't be using them.
https://stackoverflow.com/questions/18024672/what-registers-...
> Why shouldn't the caller save all the registers it needs instead of relying on the good behavior of the callee?
The cost to save a register is non-zero so it's helpful to have some registers the caller doesn't have to preserve and that don't need to be saved by the callee if it won't be using them.
https://stackoverflow.com/questions/65864046/why-make-some-r...