[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Suggested ISR function

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] Suggested ISR function
Date: Fri, 9 Sep 2005 06:51:44 +0200
User-agent: Mutt/

As James A.R. Koehler wrote:

> I'd vote for depreciating both SIGNAL and INTERRUPT in favour of
> ISR.


> Indeed, I'd go further and suggest that it intrinsically be the
> given the attribute of '__naked__' as, for the life of me, I can't
> see why it is useful to have r0 and r1 set every time an interrupt
> occurs.

Ouch, nope.

By default, an ISR must save everything that is destroyed by it, and
restore whatever the compiler needs to work.  As r0 and r1 could be in
use by a MUL (or SPM/LPM) instruction, and the compiler currently uses
them as __zero_reg__ and __temp_reg__, we cannot by default drop
saving them.

What could be done is to make the compiler smarter about detecting
whether the ISR is really going to clobber/required these registers,
but again, that takes a GCC developer to do it.  (That is, you, or you
over there, right?)

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]