函数调用中的保护:
Caller saved
™$a0-a3 -- if you will set new arguments for the calleeand $a0-a3will still be used after return, old arguments must be saved.
™$t0-t9 -- if you plan to use your temps after thereturn, save them. note that calleesare free to use temps as they please
™You need not save $s0-s7 as the calleewill take care of them
™
Calleesaved
™$s0-s7 -- before the calleeuses such a register, it must save the old contents since the caller willusually need it on return
™$ra -- must be saved before the jal instruction over-writes thisvalue. But it need not be saved in leafprocedure.
™local variables -- space is also created on the stack forvariables local to that procedure