[FFmpeg-devel] Hacks on FATE
Michael Kostylev
michael.kostylev
Thu Jun 18 13:02:58 CEST 2009
On Thu Jun 18 11:34:53 2009
M?ns Rullg?rd wrote:
> > fix building with i386-*-gcc>=3.4 -fPIC
> >
> > --- ffmpeg.orig/libavcodec/x86/h264dsp_mmx.c
> > +++ ffmpeg/libavcodec/x86/h264dsp_mmx.c
> > @@ -973,7 +973,7 @@
> > "add %4, %1 \n\t"\
> > "decl %2 \n\t"\
> > " jnz 1b \n\t"\
> > - : "+a"(src), "+c"(dst), "+g"(h)\
> > + : "+a"(src), "+c"(dst), "+m"(h)\
> > : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
> > : "memory"\
> > );\
> > @@ -1164,7 +1164,7 @@
> > "add %4, %1 \n\t"\
> > "decl %2 \n\t"\
> > " jnz 1b \n\t"\
> > - : "+a"(src), "+c"(dst), "+g"(h)\
> > + : "+a"(src), "+c"(dst), "+m"(h)\
> > : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
> > : "memory"\
> > );\
> > @@ -1649,7 +1649,7 @@
> > "add %4, %1 \n\t"\
> > "decl %2 \n\t"\
> > " jnz 1b \n\t"\
> > - : "+a"(src), "+c"(dst), "+g"(h)\
> > + : "+a"(src), "+c"(dst), "+m"(h)\
> > : "D"((x86_reg)srcStride), "S"((x86_reg)dstStride),\
> > "m"(ff_pw_5), "m"(ff_pw_16)\
> > : "memory"\
>
> A 'g' constraint allows a memory operand, so this is definitely a bug
> in gcc. Needless to say, the patch is unacceptable.
>
> Is no more recent gcc version available for OpenBSD? If yes, I would
> suggest officially not supporting the older versions that fail. If
> not, I suggest someone at OpenBSD get a clue and use it.
3.3 is probably the best one for OpenBSD. In addition to h264dsp_mmx.c
gcc>=4.2 fails to build flacdsp_mmx.c:
.../libavcodec/x86/flacdsp_mmx.c: In function ?ff_flac_compute_autocorr_sse2?:
.../libavcodec/x86/flacdsp_mmx.c:87: error: can't find a register in class ?GENERAL_REGS? while reloading ?asm?
.../libavcodec/x86/flacdsp_mmx.c:62: error: ?asm? operand has impossible constraints
.../libavcodec/x86/flacdsp_mmx.c:64: error: ?asm? operand has impossible constraints
.../libavcodec/x86/flacdsp_mmx.c:87: error: ?asm? operand has impossible constraints
.../libavcodec/x86/flacdsp_mmx.c:116: error: ?asm? operand has impossible constraints
Michael
More information about the ffmpeg-devel
mailing list