[Mplayer-cvslog] CVS: main/libmpcodecs vf_ilpack.c,1.2,1.3
D Richard Felker III
dalias at aerifal.cx
Mon Dec 15 22:23:00 CET 2003
On Mon, Dec 15, 2003 at 03:29:20PM +0100, Michael Niedermayer wrote:
> btw, ur asm code is wrong (it has undefined behavior)
>
> + "addl $16, %%esi \n\t"
> + "addl $8, %%eax \n\t"
> + "addl $8, %%ebx \n\t"
> [...]
> + "addl $32, %%edi \n\t"
> +
> + "decl %%ecx \n\t"
> [...]
> + :
> + : "S" (y), "D" (dst), "a" (u), "b" (v), "d" (&us), "c" (w/16)
> + : "memory"
> + );
>
> this modifies read only operands
Could you explain how to do it correctly, then? I tried also putting
them in the output section, but then gcc complains that I'm using >10
registers. Also, what's the correct thing to do if you want to modify
a register but throw away the value after you're done? Do you have to
create dummy variables and tell gcc to output into them?
Sorry for being an inline-asm newbie but all the docs on this I can
find _really_ suck... :(
It would be helpful to know how to do this right, since I suspect some
of my other inline asm is broken like this too...
Rich
More information about the MPlayer-cvslog
mailing list