[MPlayer-users] Proper FAST_CMOV check possible?

Edd Barrett vext01 at gmail.com
Thu Aug 5 00:14:19 CEST 2010


On Wed, Aug 4, 2010 at 6:51 PM, Edd Barrett <vext01 at gmail.com> wrote:
> On Wed, Aug 4, 2010 at 4:20 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>> Edd Barrett <vext01 <at> gmail.com> writes:
>>> I don't know why this is at the moment, but I hope to dig further in the
>>> future.
>>> In the meanwhile, any suggestions or hints are welcomed.
>> diff -uw ffmpeg/config.h mplayer/config.h
>> diff -uw ffmpeg/config.mak mplayer/config.mak
>> cd ffmpeg
>> rm libavcodec/h264_cabac.o libavcodec/libavcodec.a
>> make V=1
>> and compare with MPlayer's compilation command.
>> You could ask Mike Melanson or Michael Kostylev how FFmpeg builds on FATE, if
>> disable cmov is really required (is is also required for you with
>> --disable-debug?), you should disable it automatically for MPlayer.
> This is very odd and I think it mostly relates to binutils. If you set
> HAVE_EBX_AVAILABLE to 0, the build suceeds
> openbsd doesn't like something in the:
> in libavcodec/cabac.h.
> It could be any one of those flags that I am supposed to turn off ofcourse.
> Next question is, does anyone see a suitible workaround?

After mor investigation in the ffmpeg code, it seems that their
configure script correctly identifies (?) HAVE_EBX_AVAILABLE 0. This

    # check whether EBX is available on x86
    check_asm ebx_available '""::"b"(0)' &&
        check_asm ebx_available '"":::"%ebx"'

results in:

check_asm ebx_available ""::"b"(0)
BEGIN /tmp/ffconf.XXXXX...18928.c
    1   void foo(void){ __asm__ volatile(""::"b"(0)); }
END /tmp/ffconf.XXXXX...18928.c
E_SOURCE -DPIC -fPIC -c -o /tmp/ffconf.XXXXX...18928.o /tmp/ffconf.XXXXX...18928
/tmp/ffconf.XXXXX...18928.c: In function 'foo':
/tmp/ffconf.XXXXX...18928.c:1: error: can't find a register in class 'BREG' whil
e reloading 'asm'
/tmp/ffconf.XXXXX...18928.c:1: error: 'asm' operand has impossible constraints
BEGIN /tmp/ffconf.XXXXX...18928.c
    1   int main(void) {
    2       int x=0;
    3       __asm__ volatile(
    4           ""
    5           :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x
    6       );
    7       return 0;
    8   }
END /tmp/ffconf.XXXXX...18928.c
E_SOURCE -DPIC -std=c99 -fomit-frame-pointer -fPIC -c -o /tmp/ffconf.XXXXX...189
28.o /tmp/ffconf.XXXXX...18928.c
/tmp/ffconf.XXXXX...18928.c: In function 'main':
/tmp/ffconf.XXXXX...18928.c:3: error: can't find a register in class 'GENERAL_RE
GS' while reloading 'asm'

Do you need a check like this in mplayer?

Best Regards
Edd Barrett


More information about the MPlayer-users mailing list