AW: [En-Nut-Discussion] irqstack.h in cvs

Oliver Schulz olischulz at web.de
Sat Oct 8 15:39:00 CEST 2005


Hi William,

Let me explain my changes. 
The main intention for the change is to move the whole push/pop code out of
the macro definition to a separate function. This results in smaller program
code, b/c in the former code, for _each_ used interrupt the whole push/pop
code was generated by the compiler. 

Now just three bytes of the current stack is used to save r24, r25 and sreg.
Then the program jumps to the new funtion _irq_interrupt (located in
/arch/avr/dev/irqstack.c), which does the remaining push/pop stuff and
switching to interrupt stack. Because the function _irq_interrupt is just
included once in the program code, the generated program is a little bit
smaller than in the old version.

Ich hope this answer your questions.

Cheers,
Oliver.

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von William Baker
Gesendet: Samstag, 8. Oktober 2005 00:14
An: Ethernut User Chat (English)
Betreff: [En-Nut-Discussion] irqstack.h in cvs

On Sept 17, irqstack.h changed in the CVS on sourceforge.  In particular, it
went from pushing a bunch of registers to only pushing two.

I don't understand how this works.  It looks to me like it is only changing
the stack, but no longer preserving registers.  Can anyone explain why we
don't need to save a complete set of registers on the irq stack?

bbaker



_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list