[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a
From: |
Dmitry K. |
Subject: |
Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks. |
Date: |
Sat, 20 Nov 2004 14:39:39 +1000 |
User-agent: |
KMail/1.5 |
Paul Schlie wrote:
> - any insight as to why the compiler (3.4.3 for the sake of argument) first
> load variable into one set of registers to just then passes them to the
> function's parameter registers, as opposed to loading them there
> initially, which seems like a waste of cycles? happens for example with:
>
> volatile float f;
> f = f * f; // or most any other multi-byte libgcc defined function.
`volatile' is the reason of double reading.
avr-gcc 3.3.4 with `-mmcu=avr4 -Os -fnew-ra': beautiful code.
See:
float x;
float foo (void)
{
return x * x;
}
produce:
lds r22,x
lds r23,(x)+1
lds r24,(x)+2
lds r25,(x)+3
movw r18,r22
movw r20,r24
rcall __mulsf3
P.S. I do not say about the pair <rcall, ret>. In many cases gcc (x86 port,
for example) reduce such sequences.
- Re: [avr-libc-dev] Strange asm output, (continued)
- Re: [avr-libc-dev] Strange asm output, Dmitry K., 2004/11/10
- Re: [avr-libc-dev] Strange asm output, Paul Schlie, 2004/11/10
- Re: [avr-libc-dev] Strange asm output, Paul Schlie, 2004/11/11
- Re: [avr-libc-dev] Strange asm output, Nicolas Schodet, 2004/11/11
- Re: [avr-libc-dev] Strange asm output, Paul Schlie, 2004/11/11
- [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Paul Schlie, 2004/11/19
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Theodore A. Roth, 2004/11/19
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Paul Schlie, 2004/11/20
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Bob Paddock, 2004/11/19
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Paul Schlie, 2004/11/20
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks.,
Dmitry K. <=
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Paul Schlie, 2004/11/20
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Geoffrey Wossum, 2004/11/22
- Re: [avr-libc-dev] soliciting feedback/thoughts on potential value of a few gcc 4.0 tweaks., Paul Schlie, 2004/11/22