I am studying MIPS architecture and I can't figure why the register $v0
is caller saved.
This register is where the function stores the return value. When and why the caller must save it? May someone make a good example?
Since it is the register that will hold the return value, it cannot be callee-save. That would have created a situation where the callee both
So it's caller-save. This does not mean that the caller must save it, it just means that if the caller needs the value to persist across a call, then it must save it somewhere else.