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

Michael Niedermayer michaelni at gmx.at
Tue Nov 6 01:21:41 CET 2001


Hi

On Tuesday 06 November 2001 00:56, Fredrik Kuivinen wrote:
> On  0, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Hi
> It isn't possible to use -fomit-frame-pointer together with profiling. At
> least not for me. (I get segfaults)
me too

>
> 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...)
yes, gcc asm stuff is illogical crap imho

the problem is that if u use 
:"=r" (foo) 
:"r" (bar)
gcc is allowed to use the SAME register for both, this is why it compiles 
without -fomit-... the asm routine did really need 7 registers and without 
-fomit... gcc simply cant give 7 to an asm block

arpi would say RTFM `info gcc "C Extensions" "Extended Asm"` ;)

:"=&r" (foo)
:"r" (bar) 
should do what u expect it to do

Michael

PS: its fixed, should compile without -fomit... now



More information about the MPlayer-dev-eng mailing list