[FFmpeg-devel] Hacks on FATE
Michael Kostylev
michael.kostylev
Mon Jun 22 10:36:31 CEST 2009
On Mon Jun 22 02:44:49 2009
David Conrad wrote:
>>> fix building with i386-*-gcc-3.3 -fPIC
>>>
>>> --- ffmpeg.orig/libavcodec/x86/cavsdsp_mmx.c
>>> +++ ffmpeg/libavcodec/x86/cavsdsp_mmx.c
>>> @@ -280,7 +280,7 @@
>>> VOP(%%mm1, %%mm2, %%mm3, %%mm4, %%mm5, %%mm0, OP)\
>>> \
>>> : "+a"(src), "+c"(dst)\
>>> - : "S"((x86_reg)srcStride), "r"((x86_reg)dstStride),
>>> "m"(ADD), "m"(MUL1), "m"(MUL2)\
>>> + : "S"((x86_reg)srcStride), "rm"((x86_reg)dstStride),
>>> "m"(ADD), "m"(MUL1), "m"(MUL2)\
>>> : "memory"\
>>> );\
>>> if(h==16){\
>>> @@ -295,7 +295,7 @@
>>> VOP(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, OP)\
>>> \
>>> : "+a"(src), "+c"(dst)\
>>> - : "S"((x86_reg)srcStride), "r"((x86_reg)dstStride),
>>> "m"(ADD), "m"(MUL1), "m"(MUL2)\
>>> + : "S"((x86_reg)srcStride), "rm"((x86_reg)dstStride),
>>> "m"(ADD), "m"(MUL1), "m"(MUL2)\
>>> : "memory"\
>>> );\
>>> }\
>> An 'm' constraint requires an lvalue operand (or ought to do (llvm
>> does)), which a cast expression is not.
> This happens to be the same exact same constraint that tripped up gcc on
> OS X as well; if you instead change "a","c", and "S" (or some subset) to
> "r", does it work?
Nope, it doesn't. That is what I started from.
> It shouldn't need an "m" constraint at all.
Note, what finally is %3 (gcc>=3.4):
QPEL_CAVSV1 ff_put_cavs_qpel8_mc01_3dnow
...
"add %2, %0 \n\t"\ add %esi, %eax
"punpcklbw %%mm7, "#F" \n\t"\ punpcklbw %mm7, %mm0
"psubw "#B", %%mm6 \n\t"\ psubw %mm2, %mm6
"psraw $1, "#B" \n\t"\ psraw $1, %mm2
"psubw "#A", %%mm6 \n\t"\ psubw %mm1, %mm6
"paddw %4, %%mm6 \n\t"\ paddw (%edx), %mm6
"psraw $7, %%mm6 \n\t"\ psraw $7, %mm6
"packuswb %%mm6, %%mm6 \n\t"\ packuswb %mm6, %mm6
OP(%%mm6, (%1), A, d) \ movd %mm6, (%ecx)
"add %3, %1 \n\t" add %esi, %ecx
Michael
More information about the ffmpeg-devel
mailing list