[MPlayer-dev-eng] [PATCH] fast_cmov should be set on x86_64

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Dec 24 10:55:37 CET 2008


On Wed, Dec 24, 2008 at 05:47:54PM +0800, Zuxy Meng wrote:
> 2008/12/23 Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > Index: configure
> > ===================================================================
> > --- configure   (revision 28181)
> > +++ configure   (working copy)
> > @@ -1935,6 +1938,7 @@
> >     else
> >        cpuopt=-mcpu
> >     fi
> > +    test $_fast_cmov = "auto" && _fast_cmov=yes
> >     if test "$_runtime_cpudetection" = no ; then
> >       case "$pvendor" in
> >       AuthenticAMD)
> > @@ -1946,7 +1950,6 @@
> >           # 64-bit prescotts exist, but as far as GCC is concerned they
> >           # have the same capabilities as a nocona.
> >           proc=nocona
> > -          test $_fast_cmov = "auto" && _fast_cmov=no
> >           ;;
> >         esac
> >         ;;
> 
> Hmmm so we don't care for those who bought a 64-bit P4.

At the expense of everyone else who made sane buying decisions?
Certainly not!
Also even Intel recommends to use cmov if in doubt, so if even Intel
thinks it best :-P.
If you know how and have the motivation to extend the check to disable
fast_cmov on P4 _and only_ on P4, I'm happy.
Something like this might work, but I doubt it catches all (and I
suspect that some of those cases are missing from the 32 bit case as
well).

Index: configure
===================================================================
--- configure   (revision 28186)
+++ configure   (working copy)
@@ -1937,7 +1938,6 @@
     else
        cpuopt=-mcpu
     fi
-    test $_fast_cmov = "auto" && _fast_cmov=yes
     if test "$_runtime_cpudetection" = no ; then
       case "$pvendor" in
       AuthenticAMD)
@@ -1945,6 +1945,9 @@
       GenuineIntel)
         case "$pfamily" in
         6) proc=core2;;
+       15) proc=nocona
+           test $_fast_cmov = "auto" && _fast_cmov=no
+           ;;
         *)
           # 64-bit prescotts exist, but as far as GCC is concerned they
           # have the same capabilities as a nocona.
@@ -1956,6 +1959,7 @@
         proc=error;;
       esac
     fi # test "$_runtime_cpudetection" = no
+    test $_fast_cmov = "auto" && _fast_cmov=yes
 
     echocheck "GCC & CPU optimization abilities"
 cat > $TMPC << EOF




More information about the MPlayer-dev-eng mailing list