[FFmpeg-devel] [PATCH] Improve handling of cmov usage enablement
Måns Rullgård
mans
Sat Nov 1 18:47:38 CET 2008
Dominik 'Rathann' Mierzejewski <dominik at rangers.eu.org> writes:
> On Saturday, 01 November 2008 at 14:05, Reimar D?ffinger wrote:
>> On Sat, Nov 01, 2008 at 01:52:02PM +0100, Dominik 'Rathann' Mierzejewski wrote:
>> > The attached patch enables CMOV by default on x86_64 arch, because
>> > all x86_64 CPUs have it. It doesn't enable fast_cmov, because x86_64
>> > includes some NetBurst-architecture CPUs from Intel, which are known
>> > to have a slow implementation of CMOV.
>> >
>> > The second part of the patch disables fast_cmov for the "i686" cpu
>> > target, because that target might include NetBurst-arch CPUs.
>> >
>> > OK to apply?
>>
>> Given the statements by Intel I saw, my opinion is that we should go
>> with "enable fast_cmov unless we are really sure it is slow" - unless it
>> is some really predictable condition (in which case cmov probably is a
>> bad idea for all CPUs) cmov is likely to be faster on all CPUs except
>> netburst, including future CPUs.
>> Or in other words: Netburst is the special case, and our configure
>> should treat it as such, and personally my opinion is: you bought a
>> crappy CPU when everybody could have told you it is stupid (and going by
>> my experience a lot of people have told and been ignored), now live with
>> it, not our problem unless it is no effort for us. Complain to Intel if
>> anything.
>
> :) I'm fine with that, too. Updated patch attached.
>
>
> Index: configure
> ===================================================================
> --- configure (revision 15761)
> +++ configure (working copy)
> @@ -1245,6 +1245,8 @@
> ;;
> x86_64|amd64)
> arch="x86_32"
> + enable cmov
> + enable fast_cmov
> enable fast_unaligned
> check_cc <<EOF && enable fast_64bit && arch="x86_64"
> int test[sizeof(char*) - 7];
OK
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list