[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] assembly-c mix and interrupts
From: |
darkschine |
Subject: |
RE: [avr-gcc-list] assembly-c mix and interrupts |
Date: |
Sun, 29 Nov 2009 23:12:36 -0800 (PST) |
Weddington, Eric wrote:
>
> Many times in the embedded software world, you have to deal with
> trade-offs.
>
> Sure you could design an ISR that way and do the unit testing the way you
> describe. And I'm sure that it would make your unit testing easier. The
> trade-off though is that it makes the ISR very inefficient. It has been
> said on this mailing list as well as on the AVR Freaks website forums that
> calling functions in an ISR is a Bad Idea, if you want to keep your ISR
> short. And you *do* want to keep your ISR as short as possible.
>
> When an ISR calls a function, the compiler has no idea what registers the
> called function will use. So, to be conservative, the compiler will
> generate code to push/pop practically all registers, thus causing more
> code bloat and more time in the ISR prologue. That is your trade-off. If
> you think that ease of testing is better priority than a short ISR, then
> by all means go ahead. I know that most embedded software engineers on
> this list would rather have a short-as-possible ISR instead of that
> testing scheme. It's all a matter of priorities and trade-offs.
>
>
I see your point, I guess it all depends on the application.
The issue I am trying to draw attention to is that, in my case, the compiler
is not being conservative so the push/pop of volatile registers must be done
manually.
--
View this message in context:
http://old.nabble.com/assembly-c-mix-and-interrupts-tp26421328p26570372.html
Sent from the AVR - gcc mailing list archive at Nabble.com.
- [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/19
- Re: [avr-gcc-list] assembly-c mix and interrupts, Julius Luukko, 2009/11/19
- Message not available
- Re: [avr-gcc-list] assembly-c mix and interrupts, Julius Luukko, 2009/11/20
- [avr-gcc-list] Re: assembly-c mix and interrupts, David Brown, 2009/11/20
- Re: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/29
- Re: [avr-gcc-list] assembly-c mix and interrupts, Joerg Wunsch, 2009/11/30
- Re: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/30
- RE: [avr-gcc-list] assembly-c mix and interrupts, Weddington, Eric, 2009/11/30
- RE: [avr-gcc-list] assembly-c mix and interrupts,
darkschine <=
- Re: [avr-gcc-list] assembly-c mix and interrupts, Paul Stoffregen, 2009/11/30
- RE: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/30
RE: [avr-gcc-list] assembly-c mix and interrupts, Weddington, Eric, 2009/11/19
Re: [avr-gcc-list] assembly-c mix and interrupts, Ruud Vlaming, 2009/11/19
[avr-gcc-list] Re: assembly-c mix and interrupts, David Brown, 2009/11/19
Re: [avr-gcc-list] assembly-c mix and interrupts, Erik Christiansen, 2009/11/20