diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-11-04 16:48:34 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2002-11-04 16:48:34 +0000 |
commit | 89124ea5cbb8fcf03225437c0f4628c74fd2546f (patch) | |
tree | 4f8b2e119b7acc04f98ab36d2893438c50fac65c | |
parent | 62100f08de564b13f7e5d72c2c40be97768d2849 (diff) | |
download | xine-lib-89124ea5cbb8fcf03225437c0f4628c74fd2546f.tar.gz xine-lib-89124ea5cbb8fcf03225437c0f4628c74fd2546f.tar.bz2 |
fix some of the IA32 optimization flags and add new ones
(btw: Is there any point of still using -mcpu instead of -march?)
CVS patchset: 3189
CVS date: 2002/11/04 16:48:34
-rw-r--r-- | configure.ac | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index eb1efc8b7..f40ae25cb 100644 --- a/configure.ac +++ b/configure.ac @@ -744,7 +744,7 @@ case "$host_or_hostalias" in - i?86-*-linux* | i386-*-solaris* | i?86-* | k?-* | athlon-*) + i?86-*-linux* | i386-*-solaris* | i?86-* | k?-* | athlon-* | pentium*) if test "$GCC" = yes; then dnl Check for gcc cpu optimization support AC_TRY_CFLAGS("-mcpu=i386", @@ -759,6 +759,8 @@ case "$host_or_hostalias" in AC_TRY_CFLAGS("-mmmx",f_mmmx="-mmmx", f_mmmx="") AC_TRY_CFLAGS("-msse",f_msse="-msse", f_msse="") + AC_TRY_CFLAGS("-msse2",f_msse2="-msse2", f_msse2="") + AC_TRY_CFLAGS("-m3dnow",f_m3dnow="-m3dnow", f_-m3dnow="") dnl add x86 specific gcc CFLAGS CFLAGS="$CFLAGS -O3 -pipe -fomit-frame-pointer $f_af $f_al $f_aj $m_wm $m_psb -fexpensive-optimizations $f_si $f_nsa -ffast-math -funroll-loops -finline-functions" @@ -776,29 +778,54 @@ case "$host_or_hostalias" in archopt_val="i486" ;; i586-*) archopt_val="pentium" - CFLAGS="$CFLAGS $f_mmmx" ;; - i686-*) + pentium-mmx-*) + archopt_val="pentium-mmx" + enable_ffmmx="yes" + CFLAGS="$CFLAGS $f_mmmx" + ;; + pentiumpro-* | pentium2-* | i686-*) archopt_val="pentiumpro" + enable_ffmmx="yes" if test x"$check_athlon" = "xyes"; then if test -f /proc/cpuinfo; then modelname=`cat /proc/cpuinfo | grep "model name" -m 1 | sed -e 's/ //g' | cut -d':' -f2` case "$modelname" in *Athlon* | *Duron* | *K7*) - archopt_val="$k7cpu" ;; + archopt_val="$k7cpu" + CFLAGS="$CFLAGS $f_mmmx $f_m3dnow" + ;; esac fi fi - CFLAGS="$CFLAGS $f_mmmx $f_msse" + CFLAGS="$CFLAGS $f_mmmx" ;; k6-*) - archopt_val="k6" ;; - k7-*) - archopt_val="k7" ;; - athlon-*) - archopt_val="athlon" ;; + archopt_val="k6" + CFLAGS="$CFLAGS $f_m3dnow" + ;; + pentium3-*) + archopt_val="pentium3" + enable_ffmmx="yes" + CFLAGS="$CFLAGS $f_mmmx $f_msse" + ;; + pentium4-*) + archopt_val="pentium4" + enable_ffmmx="yes" + CFLAGS="$CFLAGS $f_mmmx $f_msse2" + ;; + athlon-4-* | athlon-xp-* | athlon-mp-*) + archopt_val="athlon-4" + enable_ffmmx="yes" + CFLAGS="$CFLAGS $f_mmmx $f_m3dnow $f_msse" + ;; + k7-* | athlon-tbird-* | athlon-*) + archopt_val="athlon" + enable_ffmmx="yes" + CFLAGS="$CFLAGS $f_mmmx $f_m3dnow" + ;; + esac - if test x"$archopt_val" != x; then CFLAGS="$CFLAGS $sarchopt=$archopt_val" DEBUG_CFLAGS="$DEBUG_CFLAGS $sarchopt=$archopt_val" @@ -815,7 +842,6 @@ case "$host_or_hostalias" in AC_DEFINE_UNQUOTED(ARCH_X86,,[Define this if you're running x86 architecture]) AC_DEFINE(FPM_INTEL,1,[Define to select libmad fixed point arithmetic implementation]) enable_w32dll="yes" - enable_ffmmx="yes" else dnl add x86 specific cc CFLAGS CFLAGS="$CFLAGS -O" |