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

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

Re: [avr-gcc-list] Unused registers saves/restores ?


From: E. Weddington
Subject: Re: [avr-gcc-list] Unused registers saves/restores ?
Date: Mon, 9 Jun 2003 23:03:45 GMT

> 10 Jun 2003 09:20 Eric wrote:
> > > 10 Jun 2003 08:12 Eric wrote:
> > > > > Hello all,
> > > > >
> > > > > Compiler:
> > > > >       avr-gcc --version
> > > > >       avr-gcc (GCC) 3.3.1 20030519 (prerelease)
> > > > >
> > > > > Programm:
> > > > >       typedef struct { long a; int b; } lo_in;
> > > > >
> > > > >       lo_in foo_lo_in (void)
> > > > >       {
> > > > >           lo_in x;
> > > > >           x.a = 1;
> > > > >           x.b = 2;
> > > > >           return x;
> > > > >       };
> > > > >
> > > > > Compile with:
> > > > >       avr-gcc -O3 -S foo_lo_in.c
> > > > >
> > > > > Result: r2,3,4,7,... not used, but saved/restored:
> > > >
> > > > Do you get the same with other optimizations?
> >
> > Including -Os?
> >
> > > > Eric
> > >
> > > avr-gcc -Os -S foo_lo_in.c  ==>  roughly the same
> >
> 
> > Is there an optimization level where it doesn't produce 
a
> > problem? (i.e. -O0, -O1, -O2)
> >
> > Eric
> 
> avr-gcc -O0 -S  ==> best result:
>       /* File "foo_lo_in.c": code   75 = 0x004b (  40), 
prologues  18, epilogues                        
> 17 */
>       Body is greate, but prologue/epilogue small.
> 

Unless anyone else (Denis? Marek?) has any other comments 
to add, I would suggest filing a GCC bug report:
<http://gcc.gnu.org/bugzilla/>

Eric Weddington





reply via email to

[Prev in Thread] Current Thread [Next in Thread]