[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: |
Bernt Hustad Hembre |
Subject: |
Re: [avr-gcc-list] saving __zero_reg__ in interrupt |
Date: |
Tue Jan 30 06:43:04 2001 |
On Mon, 29 Jan 2001, Frieder Ferlemann wrote:
> > zero it after use). Interrupt comes in at the right moment (when r1 is
> > nonzero) and you lose.
> ... seems I'm looking for trouble:)
> I did a scan with grep r1 *.lst and grep __zero_ *.lst over my listfiles
> und luckily my code doesn't modify this register.
> Guess my C-source is not too exotic:)
> So it would work for me right now (TM).
ATMega161 has a set of MUL instructions. They return the result in R0:R1.
> > Don't ;)
> it shurely is not wise to switch saving and restoring off,
> without knowing when the compiler inserts it, but...
A better solution would probably be to use a different register as the
zero-register in the future. But that will raise more compability
issues...
Bernie
Tlf.: 92648923
address@hidden