[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] saving __zero_reg__ in interrupt
From: |
Marek Michalkiewicz |
Subject: |
Re: [avr-gcc-list] saving __zero_reg__ in interrupt |
Date: |
Tue Jan 30 05:13:04 2001 |
> both gcc 2.97 and 2.95 save, clear and restore the __zero_reg__
> in interrupt routines. (-->6 Bytes for each interrupt).
> Saving/restoring seems redundant as this register
> should hold (holds) zero anyway.
It is not - some code (generated by avr-gcc, or hand-optimized assembler)
uses this register as a second temporary register (it's OK as long as you
zero it after use). Interrupt comes in at the right moment (when r1 is
nonzero) and you lose.
> Is there a way to switch off this behaviour?
Don't ;)
Marek