[FFmpeg-devel] [FFmpeg-cvslog] r12171 - trunk/doc/optimization.txt

Michael Niedermayer michaelni
Thu Feb 21 21:13:40 CET 2008


On Thu, Feb 21, 2008 at 08:46:58PM +0100, Reimar D?ffinger wrote:
> Hello,
> On Thu, Feb 21, 2008 at 09:16:39PM +0200, ?smail D?nmez wrote:
> > If you can give an example based on complex asm we can report a bug to
> > gcc, just saying gcc is not a good optimizer
> > does not help anyone, do we have another better open source compiler?
> 
> I doubt we have any seriously better compiler at all.
> 
> > No. So if you have a better example of bad asm produced we can ask
> > gcc developers.
> 
> Not asm, but maybe someone is motivated to test this with a up-to-date
> gcc on some 32 bit system:
> > #include <inttypes.h>
> > uint64_t a;
> > uint16_t b;
> > uint64_t mul(void) {
> >   return a * b;
> > }
> 
> gcc -fomit-frame-pointer -O3 -S stupidtest.c -o -
> gcc 4.2.3 at least makes the wonderful:
> >        pushl   %ebx
> >        movzwl  b, %eax
> >        xorl    %edx, %edx
> >        movl    a, %ebx
> >        movl    a+4, %ecx
> >        imull   %edx, %ebx
> >        imull   %eax, %ecx
> >        mull    a
> >        addl    %ecx, %ebx
> >        addl    %edx, %ebx
> >        movl    %ebx, %edx
> >        popl    %ebx
> >        ret

gcc-4.3 -O3 -fomit-frame-pointer
mul:
        pushl   %ebx
        movzwl  b, %eax
        xorl    %edx, %edx
        movl    a, %ecx
        movl    a+4, %ebx
        imull   %edx, %ecx
        imull   %eax, %ebx
        mull    a
        addl    %ebx, %ecx
        leal    (%ecx,%edx), %edx
        popl    %ebx
        ret
[...]
        .ident  "GCC: (Debian 4.3-20080202-1) 4.3.0 20080202 (experimental) [trunk revision 132072]"


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080221/da60d7c5/attachment.pgp>



More information about the ffmpeg-devel mailing list