[MPlayer-dev-eng] [PATCH] negating unsigned in asm code
Jindrich Makovicka
makovick at kmlinux.fjfi.cvut.cz
Tue Jun 28 16:49:26 CEST 2005
Michael Niedermayer wrote:
> Hi
>
> On Tuesday 28 June 2005 12:39, Reimar Döffinger wrote:
>
>>Hi,
>>rgb2rgb_template.c causes a lot of crashes on AMD64, since the current
>>code first negates unsigned variables and then extends them to 64 bits,
>>the result being a very big positive value instead of a negative one.
>>One possibility would be making all unsigned signed.
>>The attached patch instead does the subtraction/negating in assembler,
>>which fixes this as well (a bit at the cost of readability, but not much
>>IMHO).
>>Is it okay to apply??
>
>
> no, you are changing operands which are marked as read only, while i suspect
> it will work it might break with some versions of gcc as gcc expects read
> only operands to be unchanged after the asm
Definitely. I recently encountered such breakage in early versions of
vf_fspp.
--
Jindrich Makovicka
More information about the MPlayer-dev-eng
mailing list