[MPlayer-users] configure and Cyrix C3
Andre Majorel
aym-reyalpm at teaser.fr
Fri Nov 11 15:40:14 CET 2005
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).
- In libavutil/common.h,
- changing
#if __CPU__ >= 686 && !defined(RUNTIME_CPUDETECT)
to
#if 0
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).
Thanks.
# 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
--
André Majorel <URL:http://www.teaser.fr/~amajorel/>
Do not use this account for regular correspondence.
See the URL above for contact information.
More information about the MPlayer-users
mailing list