Subject: saving regs in mips?_SystemCall
To: None <port-mips@netbsd.org>
From: Chris G. Demetriou <cgd@sibyte.com>
List: port-mips
Date: 06/16/2000 14:18:54
So, I was reading locore_mips?.S.

I noticed that mips?_SystemCall saves the (caller-saved) t* regs.

If the situation is the same as on alpha, registers which pass syscall
arguments (looks like v0 and the a* regs) must be saved-restored, but
other caller-saved regs don't have to be (which means t* and probably
v1 and at).

Any particular reason that those regs are saved?  The syscall-return
code definitely has to restore them, but as far as I know, unless
there's a MIPS-specific reason, the entry code doesn't have to save
them.  As far as C code is concerned, syscalls (syscall stubs, really)
are just function calls.  Do any MIPS assembly routines assume
otherwise, and, if so, is there a good reason to do so?


12 stores every syscall...  8-)


chris