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.

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)



Andy




_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to