2012/3/25 R. Diez <[email protected]> > > > > I'd like to throw one more suggestion into this discussion: add a > > register to indicate whether r0 is writable or hard-wired to 0. If it's > > not writable, it's a waste to clear it at every syscall and this can be > > optimized out; if it is writable, then you can use it for clever > > optimizations (carefully). > > I don't think the extra complication is worth it. At the very minimum, > that would be another special case to test. > > I would just let R0 be like any other register, and move its usage as a > constant zero to the ABI spec. > > Cheers, > Ruben > _______________________________________________ > OpenRISC mailing list > [email protected] > http://lists.openrisc.net/listinfo/openrisc >
I'm still of the opinion that we should hardwire it to zero. I know that it will theoretically break backwards compatibility, but I would like to know if this really is an issue. The benefits of hardwiring is that it will behave like everyone (or at least I) assumed it was implemented before this discussion, and I guess we don't suffer from register starvation anyways, so that won't be a problem. We also don't have to take care about saving and restoring it. -- Olof Kindgren ______________________________________________ ORSoC Website: www.orsoc.se Email: [email protected] ______________________________________________ FPGA, ASIC, DSP - embedded SoC design
_______________________________________________ OpenRISC mailing list [email protected] http://lists.openrisc.net/listinfo/openrisc
