[FFmpeg-devel] [RFC] use ff_avc_find_startcode in ff_find_start_code

Michael Niedermayer michaelni
Tue Feb 19 20:43:47 CET 2008


On Tue, Feb 19, 2008 at 07:04:43PM +0100, Reimar D?ffinger wrote:
> Hello,
> On Tue, Feb 19, 2008 at 06:15:42PM +0100, Michael Niedermayer wrote:
> > Could you post the asm code gcc generates for you for this function?
> > mine generates:
> > .L670:
> >         movzbl  -1(%ebx), %eax
> >         cmpb    $1, %al
> >         jbe     .L651
> >         addl    $3, %ebx
> >         cmpl    %ebx, %ebp
> >         ja      .L670
> 
> Ignoring that it completely unrolls the first loop and just this part:
> .L837:
>         addq    $3, %rsi
> .L827:
>         cmpq    %rsi, %rcx
>         .p2align 4,,5
>         jbe     .L832
> .L835:
>         movzbl  -1(%rsi), %eax
>         cmpb    $1, %al
>         .p2align 4,,3
>         ja      .L837
>         cmpb    $0, -2(%rsi)
>         je      .L828
>         addq    $2, %rsi
>         cmpq    %rsi, %rcx
>         ja      .L835
> 
> Maybe it is time to make use of the unlikely() macro we already have?
> And disable that stupid alignment of general jump targets...

I dont understand why your gcc placed .p2align _before_ the jumps.


[...]
> > Also what cpu and gcc version do you have?
> 
> gcc (GCC) 4.1.2 20070214 (  (gdc 0.24, using dmd 1.020)) (Gentoo 4.1.2 p1.0.2)

just tried gcc-4.1 (GCC) 4.1.3 20080114 (prerelease) (Debian 4.1.2-19)

.L1193:
        .loc 1 122 0
        movzbl  -1(%rbx), %eax
        cmpb    $1, %al
        jbe     .L1174
        addq    $3, %rbx
        .loc 1 121 0
        cmpq    %rbx, %rbp
        ja      .L1193

So as far as i can see there is something wrong with the compiler
you use, i suggest you try a different one (a later one from gentoo or maybe
unpatched from gcc.gnu.org)

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

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- 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/20080219/af46e5e5/attachment.pgp>



More information about the ffmpeg-devel mailing list