[MPlayer-dev-eng] Re: [SURVEY] change default CPU target when compiled with runtime CPU detection
Ivor Hewitt
ivor at ivor.org
Sun Nov 13 08:20:27 CET 2005
Guillaume POIRIER wrote:
> Hi,
>
> On 11/12/05, Guillaume POIRIER <poirierg at gmail.com> wrote:
>> Hi,
>> I've committed a patch to configure script to support VIA/Cyrix C2
>> CPU. C2 is really an El Cheapo cpu as it doesn't feature any buzz
>> words like SSE or 3dnow! (shame!).
>> Anyway, in order to support this little baby, we'd need to set default
>> "mcpu" from i686 to i586.
>>
>> Here's the corresponding code in configure script (note the i686 is
>> _*probably*_ the most common CPU):
>>
>> else # if test "$_runtime_cpudetection" = no
>> # i686 is probably the most common CPU - optimize for it
>> _mcpu="$cpuopt=i686"
>> # at least i486 required, for bswap instruction
>> _march="-march=i486"
>
> According to GCC's man page, changing mcpu to i586 just changes the
> scheduling of instructions, when it's -march that tells what
> instructions are allowed, so the proper solution is not there.
>
> The guy who reported the problem mentioned that changing this like:
>
> #if __CPU__ >= 686 && !defined(RUNTIME_CPUDETECT)
>
> to #if 0 was fixing the problem for him. Now I'm wondering how _CPU_
> is set. I it looking at a variable set by the configure script (which
> I doubt very much)? What to do?
>
Guillaume,
VIA C2? I was only aware of the VIA C3 (Samuel2) or the VIA C3-2 (Nehemiah)
Both of which do have some buzz words.
Summary of various C3 features:-
http://epialinux.org/files/epia_howto/ar01s01.html (ignore the cflags on that
page)....
Example cflags:-
http://www.courville.org/phpwiki/Gcc
http://gentoo-wiki.com/Safe_Cflags
The earlier Ezra core C3's had the missing cmov option and supported
mmx+3dnow. The easiest option was to simply compile for i586 (with 3dnow) on
them.
The later Nehemiah core's did include the cmov and also include sse, so
compiling i686 is usually easiest.
Also note the suggested "-Os" flag for Ezra due to the tiny CPU cache.
Cheers,
Ivor.
More information about the MPlayer-dev-eng
mailing list