David Daney wrote:
sys_sigreturn does not return to the caller in the conventional sense.
I expect you're talking about this bite of code taken from _sys_sigreturn(): /* * Don't let your children do this ... */ __asm__ __volatile__( "move\t$29, %0\n\t" "j\tsyscall_exit" :/* no outputs */ :"r" (®s));
The entire user context (i.e. the value of *all* registers) is replaced with the values stored in the sigcontext structure on the caller's stack. If all registers are being restored from the sigcontext, then there is no need to save the current values of the registers, because they will never be used.
But I don't see where _all_ registers are saved. Only static registers are saved by save_static_function() right before calling _sys_sigreturn() and I agree I don't why we need to save those. And now I'm starting to think that we don't need to save static regs in setup_sigcontext() either... -- Franck