----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, January 31, 2008 7:14 PM Subject: Re: [avr-gcc-list] Save RAMPZ register in interrupt handler routines
> The perfect way to handle RAMPZ is declare it as fixed register to GCC. > Then for each instruction pattern that modifies it, add the required > clobber, set or use of that register. > Epilog and prolog can then check to see if RAMPZ is modfied and save it. > Yes it is the best way, and it will be necessary to do so. > However, it would seem that just checking for r30,r31 usage in > prolog/epilog is an easier method that achieve some of the benefits. > > RAMPZ will erroneously be saved when the usage of R30,r31 is innocent - or > the function calls ANY other function (since r30,R31 is a call used > register and assumed to be modified by any called function) > > If in interrupt handler routines function is called, thet the RAMPZ register should be kept, it is not known, the RAMPZ register changes or not in this function. Yes I agree, simple check on use of R30, R31 registers, can give false positive result. Anatoly. _______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
