[MPlayer-dev-eng] Invalid asm constructs in swscale.c

Fredrik Kuivinen freku045 at student.liu.se
Tue Nov 6 00:56:41 CET 2001


On  0, Michael Niedermayer <michaelni at gmx.at> wrote:
> Hi
> 
> On Monday 05 November 2001 23:54, Fredrik Kuivinen wrote:
> > Hello,
> >
> > I got the following error when compiling the mplayer cvs with gcc 2.95.4:
> >
> > gcc -c -W -Wall -O2 -march=i686 -mcpu=i686 -g -p -D_REENTRANT -I. -I..
> > -Wall -o swscale.o swscale.c swscale.c: In function `SwScale_YV12slice':
> > swscale.c:1447: warning: comparison between signed and unsigned
> > swscale.c:749: Invalid `asm' statement:
> > swscale.c:749: fixed or forbidden register 0 (ax) was spilled for class
> > GENERAL_REGS. make[1]: *** [swscale.o] Error 1
> >
> > There are three similiar errors in swscale.c. The attached patch fixes
> > these errors.
> very funny :)
> it should fix the errors but it will not work anymore (the bgr24 output, the 
> rest will still work)
> 
> use the -fomit-frame-pointer switch when compiling mplayer!!!!
> ill fix this anyway, as its easy and will not slow anything down
>

It isn't possible to use -fomit-frame-pointer together with profiling. At least
not for me. (I get segfaults)

BTW Isn't it better not to use eax and ebx directly? Doing something like

int dummy1, dummy2;
asm ("... " /* Use %0 instead of %%eax and %1 instead of %%ebx */
     : "=r" (dummy1), "=r" (dummy2)
     : ...

This will allow the compiler to use whatever registers it wish. At the same time
the dependency on -fomit-frame-pointer will go away.

(I haven't done much assembly at all so this might be completely wrong...)

/ Fredrik Kuivinen




More information about the MPlayer-dev-eng mailing list