|Subject:||Re: [avr-gcc-list] Interrupt prologues|
|Date:||Mon, 31 Jan 2005 17:08:45 -0700|
|User-agent:||Mozilla Thunderbird 0.7.3 (Windows/20040803)|
Curtis Maloney wrote:
Well it's not "hidden" from GCC. GCC knows about them. But it's part of the ABI that the zero and tmp regs can be used by any function. So, an interrupt happens, and the ISR needs to save and restore it as your generated code in the ISR could use those registers, for example assigning zero to a variable.All looks sane enough. Saving the zero, temp, and status regs, and the two regs the ISR uses.However, why save the zero and tmp regs, when they are not used at all in the function? Is this because they're "hidden" from GCC, and saved as a precaution?
If you're absolutely sure that your ISR won't use them and you need faster timing, I think the method you can use is to declare your ISR with a naked attribute, and then do the prologue and epilogue yourself. I haven't used that method, but search this list. IIRC, it was talked about recently.
|[Prev in Thread]||Current Thread||[Next in Thread]|