[MPlayer-users] ffmpeg/libavcodec compiling errors

Mike michael at 2020support.com
Thu Oct 25 17:00:18 CEST 2001


Hello,

>make -C libavcodec
>make[1]: Cambiando a directorio
>`/home/linuxinst/video/MPlayer-0.50/libavcodec'
>gcc -O4 -march=k6 -mcpu=k6 -pipe -ffast-math -fomit-frame-pointer -Wall -g
>-DHAVE_AV_CONFIG_H -c -o i386/dsputil_mmx.o i386/dsputil_mmx.c
>i386/dsputil_mmx.c: In function `put_pixels_x2_3dnow':
>i386/dsputil_mmx_avg.h:51: Can't find a register in class `GENERAL_REGS'
>while reloading `asm'.
>i386/dsputil_mmx.c: In function `avg_pixels_3dnow':
>i386/dsputil_mmx_avg.h:135: Can't find a register in class `GENERAL_REGS'
>while reloading `asm'.
>i386/dsputil_mmx.c: In function `put_pixels_x2_sse':
>i386/dsputil_mmx_avg.h:51: Can't find a register in class `GENERAL_REGS'
>while reloading `asm'.
>i386/dsputil_mmx.c: In function `avg_pixels_sse':
>i386/dsputil_mmx_avg.h:135: Can't find a register in class `GENERAL_REGS'
>while reloading `asm'.
>i386/dsputil_mmx.c: In function `put_pixels_mmx':
>i386/dsputil_mmx.c:199: Can't find a register in class `GENERAL_REGS'
>while reloading `asm'.
>make[1]: *** [i386/dsputil_mmx.o] Error 1
>make[1]: Saliendo directorio
>`/home/linuxinst/video/MPlayer-0.50/libavcodec'
>make: *** [libavcodec/libavcodec.a] Error 2
>
 I have had another session with this particular problem and it looks as if it is not an Mplayer problem, but an ffmpeg problem because the same thing happens with the ffmpeg 0.4.5 downloaded from sourceforge. The problem seems to be in this particular ASM statement:-

__asm __volatile(
        "movq   %4, %%mm0\n\t"
        "movq   %5, %%mm1\n\t"
        "movq   %6, %%mm2\n\t"
        "movq   %7, %%mm3\n\t"
        "movq   %%mm0, %0\n\t"
        "movq   %%mm1, %1\n\t"
        "movq   %%mm2, %2\n\t"
        "movq   %%mm3, %3\n\t"
        :"=m"(*p), "=m"(*(p+line_size)), "=m"(*(p+line_size*2)), "=m"(*(p+line_size*3))
        :"m"(*pix), "m"(*(pix+line_size)), "m"(*(pix+line_size*2)), "m"(*(pix+line_size*3))
        :"memory");
        ^^^^^^^^^^^ <- it dies at this line.
        pix = pix + line_size*4;
        p =   p   + line_size*4;
    }

for some reason a register is being referenced that is not in the GENERAL_REGS macro that is used by the gcc (i'm using 2.95.2 and haven't downgraded) compiler and it dies at this point because the compiler only sees it at the end of the asm statement. I dont know if any ASM men know what is happening but it doesn't really matter because if you remove libavcodec or use CVS it compiles ok.

Michael.

P.S. Forgot to mention that the error above is from a previous poster who was using gcc 2.9-6 (the dash is in case the list is filtered). With my gcc 2.95.2 the error says the that 'invalid asm statement, register 6 (bp) was spilled for class GENERAL_REGS'. Like I say it compiles ok with all optimisations turned on for my PIII as long as I avoid libavcodec so I am not too concerned about this but I thought I would try reading the gcc manuals to see if I could work out what was going on.





More information about the MPlayer-users mailing list