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

Michael Niedermayer michaelni
Thu Feb 21 21:17:50 CET 2008


On Thu, Feb 21, 2008 at 09:10:56PM +0100, Reimar D?ffinger wrote:
> On Thu, Feb 21, 2008 at 09:51:53PM +0200, ?smail D?nmez wrote:
> > >  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 4.4 trunk produces :
> > 
> > 	movq	_b at GOTPCREL(%rip), %rax
> > 	movzwl	(%rax), %eax
> > 	movzwl	%ax, %edx
> > 	movq	_a at GOTPCREL(%rip), %rax
> > 	movq	(%rax), %rax
> > 	imulq	%rdx, %rax
> > 	leave
> > 	ret
> 
> I am fairly certain that not even gcc < 3 managed to get that wrong on a
> _64-bit_ system...

my 2.95 doesnt seem to support x86-64
but all the later ones create:
.LFB6:
        movzwq  b(%rip), %rax
        imulq   a(%rip), %rax
        ret


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

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- 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/7c5032d5/attachment.pgp>



More information about the ffmpeg-devel mailing list