[MPlayer-dev-eng] Asm parameter constraints (was: Improved remove-logo filter)

Loren Merritt lorenm at u.washington.edu
Sun Nov 5 08:46:05 CET 2006


On Sat, 4 Nov 2006, Trent Piepho wrote:
> On Fri, 3 Nov 2006, Uoti Urpala wrote:
>
>> Michael's original comment which you disagreed with said that if you do
>> use [out]"=m"(a):[in]"m"(a) then [out] and [in] could be the same memory
>> location or different ones, and [out] might overlap some other input
>> parameter. I don't see anything in your latest reply which would show
>> that gcc guarantees the opposite will always be true.
>
> You are saying that if you write [out]"=m"(a):[in]"m"(b) then out and in
> could overlap?  This is what you mean when you say, "[out] might overlap
> some other input parameter?"
>
> If that is the case, what would you write so that out and in can't overlap?
> Or do you think there is no way to keep [out]"=m"(a) from overlapping some
> other input paramters, and it is thus impossible to have a "=m" parameter
> that is used before all inputs are consumed?

[out]"=&m"(a)

earlyclobber ("&") is specifally for that situation.

--Loren Merritt



More information about the MPlayer-dev-eng mailing list