[MPlayer-dev-eng] Re: [SURVEY] change default CPU target when compiled with runtime CPU detection

Zuxy zuxy.meng at gmail.com
Sun Nov 13 08:40:38 CET 2005


2005/11/13, Zuxy <zuxy.meng at gmail.com>:
>
> __CPU__ is defined as $iproc, which is in turn generally defined as
> the family as returned by executing cpuid on a specific CPU. For VIA,
>
> ...
>  CentaurHauls)
>    case "$pfamily" in
>    5) iproc=586
>    if test "$pmodel" -ge 8; then
>        proc=winchip2
>    elif test "$pmodel" -ge 4; then
>        proc=winchip-c6
>    else
>        proc=i586
>    fi
>    ;;
>    6) iproc=686
>        # VIA C3 has SSE, but doesn't have MMX2
>        # workaround for SSE => MMX2 implication above
>        _mmx2=no
>    if test "$pmodel" -ge 9; then
>        proc=c3-2
>    else
>        proc=i686
>    fi
>    ;;
>    *) proc=i686 iproc=i686 ;;
>    esac
>    ;;
> ...
>
> IIRC, in the general instruction set (excluding SIMD instructions) an
> i686 differs from an i586 only in that the former supports cmov, fcmov
> and ficomp, indicated by the CMOV bit in cpuid standard feature
> string. For Intel and AMD, all Family 6 CPUs support cmov, and that's
> what -march=686 assumes. Doesn't  a C2 support cmov while insisting it
> be of family 6?
>
>
> Is there an official VIA CPU manual available online?
>

Hi, I've checked x86info source from Dave Jones. CentaurHauls Family 6
CPUs are indeed of two distinct type. Model 9 (the so called C3-2)
supports cmov, mmx and sse, much like a pentium iii, so it's ok to use
-march=i686 when -march=c3-2 isn't available; others however support
mmx and 3dnow!, but don't support cmov or sse, much like a k6-3. VIA
states that all these cpus are truely of family 6, i.e. capable of
dynamic execution and superscalar. Hence the patch.

Besides, I wonder why the _mmx2=no line is still there. I thought
another thread has already explained very well the reason for the
sse->mmx2 implication.

Also, I suggest the -mtune=pentium4 instead of 686 when runtime cpu
detection is required, because IMHO the most common cpu now is a 786
(pentium4 or athlon64) instead of a 686.

--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: c3configure
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20051113/89edbfd4/attachment.txt>


More information about the MPlayer-dev-eng mailing list