[MPlayer-dev-eng] [PATCH] configure: -mtune=generic for runtime CPU detection
Zuxy Meng
zuxy.meng at gmail.com
Fri Mar 30 05:13:28 CEST 2007
Hi,
gcc 4.2.0 (currently in rc1 stage) will support "generic"
optimization, which promises to deliver optimal performance on a
collection of "comtemporary" CPUs (now including AMD Athlon, AMD
Opteron, Intel Pentium M, Intel Pentium 4 and Intel Core 2). This
patch add this feature for mplayer, falling back to i686 for older
gcc.
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
Index: configure
===================================================================
--- configure ???????? 22356??
+++ configure ????????????
@@ -1682,10 +1684,10 @@
_optimizing="$proc"
fi
else # if test "$_runtime_cpudetection" = no
- # i686 is probably the most common CPU - optimize for it
- _mcpu="$cpuopt=i686"
+ _mcpu="$cpuopt=generic"
# at least i486 required, for bswap instruction
_march="-march=i486"
+ cc_check $_mcpu || _mcpu="$cpuopt=i686"
cc_check $_mcpu || _mcpu=""
cc_check $_march $_mcpu || _march=""
fi
@@ -1794,7 +1797,8 @@
else # if test "$_runtime_cpudetection" = no
# x86-64 is an undocumented option, an intersection of k8 and nocona.
_march="-march=x86-64"
- _mcpu="$cpuopt=x86-64"
+ _mcpu="$cpuopt=generic"
+ cc_check $_mcpu || _mcpu="x86-64"
cc_check $_mcpu || _mcpu=""
cc_check $_march $_mcpu || _march=""
fi
More information about the MPlayer-dev-eng
mailing list