[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] gcc signal overhead, redundant code, bug (?), far fro
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] gcc signal overhead, redundant code, bug (?), far from optimal |
Date: |
Thu, 18 Aug 2005 23:32:13 +0200 (MET DST) |
"Szikra Istvan" <address@hidden> wrote:
> First of all, why clear __zero_reg__ ? It is NOT used in the
> interrupt. Hell why push, clr, pop, isn't supposed zero be in it
> anyway?
Not within an interrupt routine. The ABI choice of r0/r1 for
__temp_reg__ and __zero_reg__ predates the modern AVR cores, and is a
poor choice from today's point of few: the hardware multiplier and
some other operations that have been added to the CPU core later on
implicitly use r0 and/or r1. Thus, an ISR cannot rely on __zero_reg__
really being zero. (It would be interesting to see whether we could
really migrate the compiler to a different register in the long run.)
> The second, in this case why save SREG? Which instruction uses it?
The compiler simply doesn't analyze that level of detail, it seems,
but rather always emits a standard preamble and trailer snippet. If
you've got an hour of time (or an entire weekend? :), you could make a
stab at improving the optimizer here I think... ;-)
OTOH, in your case, it might be worth the while to move out the entire
ISR into an assembly source file of its own.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
- [avr-gcc-list] gcc signal overhead, redundant code, bug (?), far from optimal, Szikra Istvan, 2005/08/18
- Re: [avr-gcc-list] gcc signal overhead, redundant code, bug (?), far from optimal,
Joerg Wunsch <=
- RE: [avr-gcc-list] gcc signal overhead, redundant code, bug (?), far from optimal, Szikra Istvan, 2005/08/18
- Re: [avr-gcc-list] gcc signal overhead, redundant code, bug (?), far from optimal, David Kelly, 2005/08/18
- Re: [avr-gcc-list] gcc signal overhead, redundant code, bug (?), far from optimal, David Brown, 2005/08/19
- Prev by Date:
Re: [avr-gcc-list] Generating code using sbis, sbic
- Next by Date:
Re: [avr-gcc-list] gcc signal overhead, redundant code, bug (?), far from optimal
- Previous by thread:
[avr-gcc-list] gcc signal overhead, redundant code, bug (?), far from optimal
- Next by thread:
RE: [avr-gcc-list] gcc signal overhead, redundant code, bug (?), far from optimal
- Index(es):