avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] int (*256) optimization problem in avr-gcc 4.5.3


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] int (*256) optimization problem in avr-gcc 4.5.3
Date: Tue, 7 Feb 2012 08:57:48 +0100 (MET)

=?ISO-8859-2?Q?Pawe=B3_Stawicki?= <address@hidden> wrote:

> I found a issue in the optimization part of gcc-avr.

If I run your code through my compiler, I get the following assembler
output:

..global _Z1fv
        .type   _Z1fv, @function
_Z1fv:
        push r28
        push r29
/* prologue: function */
/* frame size = 0 */
/* stack size = 2 */
..L__stack_usage = 2
        call _Z5getchv
        mov r29,r24
        ldi r24,lo8(0)
        mov r28,r24
        call _Z5getchv
        add r28,r24
        adc r29,__zero_reg__
        movw r24,r28
/* epilogue start */
        pop r29
        pop r28
        ret
        .size   _Z1fv, .-_Z1fv

This is GCC 4.5.1, but with a patch for bug #46779 (which is only
fixed in GCC 4.7 and GCC 4.6).  I'm not sure whether this would be
"your" bug, too, but I think it's possible.

-- 
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]