[MPlayer-dev-eng] Improved remove-logo filter
Trent Piepho
xyzzy at speakeasy.org
Wed Nov 1 20:47:22 CET 2006
On Wed, 1 Nov 2006, Michael Niedermayer wrote:
> On Wed, Nov 01, 2006 at 03:42:30AM -0800, Trent Piepho wrote:
> > On Wed, 1 Nov 2006, Michael Niedermayer wrote:
> > > On Tue, Oct 31, 2006 at 01:13:29PM -0800, Trent Piepho wrote:
> > > does gcc 2.7.2 compile mplayer at all?
> >
> > Sorry, I meant 2.95, but I'm not sure if that's the case. Some older gcc
I'm now more sure of how this worked. In 2.7.2, '+' wasn't allowed. In
2.95, it was allowed but didn't work correctly. I'm not sure when, or if,
it was fixed.
> > You might also want to look at these threads:
> > http://marc.theaimsgroup.com/?l=linux-kernel&m=107475162200773&w=2
> > > does not prevent %0 == %1 if you want an output to not be able to use the
> > > same register or memory location as an random input then you must use "=&..."
> > > iam not sure if that could cause any problems with your code as i didnt look
> > > at it, just the constraints quoted above in which "=m" (accumulator) and
> > > "m" (accumulator) could be in the same memory location or a different one
> > > or "=m" (accumulator) and "g" (stride) could be in the same memory location
> >
> > How could accumulator be in two different memory locations?
>
> an opimizing compiler can make a copy, for example it could copy it to
> the stack, gcc may or may not be capable of that but that doesnt matter
> for the validity of the code ...
It isn't allowed do that. If it did, it would be impossible to write
atomic operations. There would be no way to write something like a
spin-lock.
> > Before you say gcc could allot some new memory and copy the variables in
> > and out, please read the message from Richard Henderson that I linked to
> > that explains why this can't be done.
>
> yes i read it, i also read linus reply which basically said
> "Please fix the compiler"
Linus is saying allow "+m"(x) constraints by making them the same as
"=m"(x):"m"(x). He's not saying gcc should be able to copy variables in
and out of a temporary memory location for asm constructs. In fact, he
specificly says something like "=m"(x) : "0"(y) that would require two
different variables to be in the same place in memory shouldn't be allowed.
More information about the MPlayer-dev-eng
mailing list