[FFmpeg-devel] [PATCH] Improve handling of cmov usage enablement

Dominik 'Rathann' Mierzejewski dominik
Sat Nov 1 13:52:02 CET 2008


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?


MPlayer http://mplayerhq.hu | Livna http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
Index: configure
--- configure	(revision 15761)
+++ configure	(working copy)
@@ -1245,6 +1245,7 @@
+        enable cmov
         enable fast_unaligned
         check_cc <<EOF && enable fast_64bit && arch="x86_64"
         int test[sizeof(char*) - 7];
@@ -1591,13 +1592,13 @@
             disable cmov
         # targets that do support conditional mov (cmov)
-        i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2)
+        pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2)
             add_cflags "-march=$cpu"
             enable cmov
             enable fast_cmov
-        # targets that do support conditional mov but on which it's slow
-        pentium4|pentium4m|prescott|nocona)
+        # targets that do support conditional mov but on which it is (or might be) slow
+        i686|pentium4|pentium4m|prescott|nocona)
             add_cflags "-march=$cpu"
             enable cmov
             disable fast_cmov

More information about the ffmpeg-devel mailing list