[MPlayer-dev-eng] [PATCH] vf_osd take two

Michael Niedermayer michaelni at gmx.at
Wed Sep 7 23:00:32 CEST 2005


Hi

On Tue, Sep 06, 2005 at 07:01:50PM -0400, Jason Tackaberry wrote:
[...]
> > [...]
> > > +            : "=r" (dst),
> > > +              "=r" (src),
> > > +              "=r" (osd),
> > > +              "=r" (alpha)
> > > +            : "m" (c) 
> > > +            : "%ecx", "memory");
> > 
> > %1 is a output operand so you can read & write to it but its initial value
> > doesnt have to be src
> > "+r" (src) would be input+output
> > "=r"(src) : "1"(src) should work too
> 
> I have to plead ignorance here.  Why are these alternatives better than
> what I have above?  I don't doubt that they are, just that I don't know
> why. :)

input operands will cause gcc to place the specified values in the specified
registers or memory locations, output operands will cause gcc to take the
values from the specified registers or memory locations and put them in the
specified variables
furthermore gcc assumes that registers which are not in the clobber list or
the output operands will not be changed by the asm
...

now "=r" (src) is a output so you may change it which you do but you expect
its initial value to be src which well is not guranteed

[...]

-- 
Michael




More information about the MPlayer-dev-eng mailing list