[Top][All Lists]

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

Re: [avr-gcc-list] avr-gcc toolchain problem on x86-64 system

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] avr-gcc toolchain problem on x86-64 system
Date: Thu, 7 Jun 2007 20:44:26 +0200 (MET DST)

Bob Paddock <address@hidden> wrote:

> 4.1.2 makes larger code than 3.4.6 and no longer fits in some
> smaller devices like the 2313.

For the applications I've been working on, it produces 5...10 %
smaller code.  For those apps where it produces larger code, please
analyze this, and if you can isolate it, file GCC bug reports for it.
Arguably, it's a bit of work to do that (and to subsequently discuss
the issue with the GCC developers), but it's the only way how it might
possibly be fixed in future releases.  I already started so, see


for one example.  Btw., to single out that one as the reason for your
code size changes, try compiling with -fno-inline.

Also, keep in mind that Björn Haase's ATmega256x patch added the
feature to make main() a normal function, which causes it to get a
prologue and epilogue.  This can be avoided by using:

int main(void) __attribute__((naked, noreturn));

        /* ... */
        for (;;) {
                /* ... */

which causes a warning about a noreturn function returning, but will
otherwise produce about the same code as it used to do before without
that patch.  The final solution will probably be a new attribute that
does approximately the same as the above combination except that
main() is still allowed to return a value anyway (so the above warning
won't be triggered anymore).

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]