b8f04323dc
(restore_gpr): Use N-1 as subscript into sc_gpr (sc_gpr[0] => $1). Before general regs, restore from sc_mdlo and sc_mdhi. Don't treat sp, fp specially; use restore_gpr for them too. For final return, store user $1 value beyond top of user stack ahead of time; Then use $1 to hold the user PC, and restore it from the stack in the delay slot.