[MPlayer-users] configure and Cyrix C3
Guillaume POIRIER
poirierg at gmail.com
Fri Nov 11 21:50:35 CET 2005
Hi,
On 11/11/05, Andre Majorel <aym-reyalpm at teaser.fr> wrote:
> As of today, MPlayer HEAD does not build out of the box on
> Cyrix/VIA C3 systems. It compiles, but the resulting binary
> crashes with an "Illegal instruction" error.
>
> configure (correctly) detects a 686 CPU and (incorrectly) passes
> GCC the -march=i686 option. gcc -march=i686 produces code which
> uses the CMOV instruction, which is missing on the C3. This is
> true for all versions of GCC, as far as I know. Checked with 3.3.5
> and 4.0.2.
>
> I got it to work by
>
> - in config.mak,
> - setting TARGET_CPU to "c3",
> - in OPTFLAGS, replacing "-march=i686" by "-march=c3",
> - in OPTFLAGS, replacing "-mtune=i686" by "-mtune=486" (I'm
> told the 486 scheduling gives the best results with C3s).
Could you please try the attached patch with gcc-3.3 and 4.0?
> - In libavutil/common.h,
> - changing
> #if __CPU__ >= 686 && !defined(RUNTIME_CPUDETECT)
> to
> #if 0
looks like c3 can't be compiled reliably with runtime cpu detection.
That probably should be fixed in a separate patch I think.
> The "c3" arch was added in release 3.3 of GCC. With GCC 3.2 and
> earlier, you have to use i386, i486 or i586 (either will do).
Noted.
> # cat /proc/cpuinfo
> processor : 0
> vendor_id : CentaurHauls
> cpu family : 6
> model : 7
> model name : VIA Ezra
> stepping : 8
> cpu MHz : 800.132
> cache size : 64 KB
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 1
> wp : yes
> flags : fpu de tsc msr cx8 mtrr pge mmx 3dnow
> bogomips : 1603.45
Guillaume
--
Reading doesn't hurt, really!
-- Dominik 'Rathann' Mierzejewski
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.1101
diff -u -r1.1101 configure
--- configure 7 Nov 2005 10:30:37 -0000 1.1101
+++ configure 11 Nov 2005 20:41:08 -0000
@@ -914,6 +914,8 @@
_mmx2=no
if test "$pmodel" -ge 9; then
proc=c3-2
+ elif test "$pmodel" -ge 7; then
+ proc=c3-2
else
proc=i686
fi
@@ -973,7 +975,7 @@
if test "$proc" = "i686" || test "$proc" = "pentium-mmx" || test "$proc" = "winchip-c6" || test "$proc" = "winchip2"; then
cc_check -march=$proc $cpuopt=$proc || proc=i586
fi
- if test "$proc" = "i586" || test "$proc" = "c3" ; then
+ if test "$proc" = "i586" || test "$proc" = "c3" || test "$proc" = "c3-2"; then
cc_check -march=$proc $cpuopt=$proc || proc=i486
fi
if test "$proc" = "i486" ; then
More information about the MPlayer-users
mailing list