> i) if r0 is a regular, call-saved register normally used as > fixed-function register with value 0, that's fine; but in this case I > need to save and restore it for all context switches. Also, GCC has to > initialize it at the start of every new process.
Is that not the case today? The spec has never mandated that R0 must be hard-wired to zero, and the most popular implementation (or1200) does not, so everybody must save and restore R0 anyway. Say your operating system dictates that all software running on it must be ABI compliant. You still must save and restore (or clear) R0 at many places for security reasons anyway. You can of course optimise your software for a particular CPU implementation that does hard-wire R0 to 0, but I don't think many people will find it worth the effort. Generic OpenRISC software will have to save and restore (or clear) R0 just in case. Regards, rdiez _______________________________________________ OpenRISC mailing list [email protected] http://lists.openrisc.net/listinfo/openrisc
