using GCC, I basically want to quickly set a timer register before SREG is saved, for time critical reasons. saving SREG is taking 12 cycles at the beginning of the ISR, and I need to set my timer register in less than 8 cycles.
I also need to do other things in the interrupt before leaving it, but I need to get timer register set asap. the kicker is I'd like to be able to do this in C, and just examine the lss file to make sure it's proper, instead of mixing asm and C, if possible.
naked ISR should do the trick, but im not sure which asm opcodes will affect SREG, and which are safe to use in this situation, I'm sure this has been done countless times before. can anyone point me to an example such a trick? ...also is their a clever table which tells what opcodes affect SREG?