Re: [AD] Pentium Pro optimizations under *nix |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Allegro Developers list <conductors@xxxxxxxxxx>
- Subject: Re: [AD] Pentium Pro optimizations under *nix
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Fri, 4 Oct 2002 22:03:50 +0200
- Organization: University of Amsterdam
> I think --enable-pentiumproopts and --enable-exclusiveopts would be more
> consistent.
>
> Moreover, I think you could enable non-exclusive Pentium optimizations by
> default on x86 processors (allegro_cv_support_asm=i386 is probably the
right
> test) if no optimizations are specified, like on the DOS/Windows side.
Done, patch attached.
The change (relative to previous patch) is that now --enable-pentiumopts is
overwritten by --enable-pentiumproopts instead of the other way around.
It also adds a --enable-k6opts, to enable k6 optimizations. I considered
adding optimization options for i386 and i486, but then decided not to
bother. I modified the script so that it is rather easy to include new
target options, though.
The pentium/pentiumpro/k6 options are all ignored when running on non-intel
machines (that is, when allegro_cv_support_asm=i386 fails).
Tested under SuSE Linux.
*** configure.in.lessold Fri Oct 4 21:51:15 2002
--- configure.in Fri Oct 4 21:48:21 2002
***************
*** 72,90 ****
[ --enable-staticprog[=x] link programs with static library [default=no]],
test "X$enableval" != "Xno" && allegro_build_static_programs=yes)
! dnl Enable Pentium optimizations.
AC_ARG_ENABLE(pentiumopts,
! [ --enable-pentiumopts[=x] enable Pentium optimizations [default=no]],
! test "X$enableval" != "Xno" && allegro_pentium_optimizations=yes)
dnl Enable Pentium Pro optimizations.
! AC_ARG_ENABLE(i686opts,
! [ --enable-i686opts[=x] enable Pentium Pro optimizations [default=no]],
test "X$enableval" != "Xno" && allegro_pentiumpro_optimizations=yes)
dnl Enable exclusive code generation.
! AC_ARG_ENABLE(exclopts,
! [ --enable-exclopts[=x] enable processor exclusive optimizations [default=no]],
test "X$enableval" != "Xno" && allegro_exclusive_optimizations=yes)
dnl Sanity check on shared/static options
--- 72,96 ----
[ --enable-staticprog[=x] link programs with static library [default=no]],
test "X$enableval" != "Xno" && allegro_build_static_programs=yes)
! dnl Disable Pentium optimizations.
AC_ARG_ENABLE(pentiumopts,
! [ --enable-pentiumopts[=x] optimize for Pentium on intel machines [default=yes]],
! test "X$enableval" != "Xno" && allegro_pentium_optimizations=yes,
! allegro_pentium_optimizations=yes)
!
! dnl Enable AMD k6 optimizations.
! AC_ARG_ENABLE(k6opts,
! [ --enable-k6opts[=x] enable optimizations for k6 processor [default=no]],
! test "X$enableval" != "Xno" && allegro_k6_optimizations=yes)
dnl Enable Pentium Pro optimizations.
! AC_ARG_ENABLE(pentiumproopts,
! [ --enable-pentiumproopts[=x] enable Pentium Pro optimizations [default=no]],
test "X$enableval" != "Xno" && allegro_pentiumpro_optimizations=yes)
dnl Enable exclusive code generation.
! AC_ARG_ENABLE(exclusiveopts,
! [ --enable-exclusiveopts[=x] enable processor exclusive optimizations [default=no]],
test "X$enableval" != "Xno" && allegro_exclusive_optimizations=yes)
dnl Sanity check on shared/static options
***************
*** 177,198 ****
else
WFLAGS="-Wall"
fi
! if test "X$allegro_pentiumpro_optimizations" = "Xyes"; then
! if test "X$allegro_exclusive_optimizations" = "Xyes"; then
! TARGET_ARCH="-march=i686"
! else
! TARGET_ARCH="-mcpu=i686"
! fi
! else
TARGET_ARCH=
- fi
- if test "X$allegro_pentium_optimizations" = "Xyes"; then
if test "X$allegro_exclusive_optimizations" = "Xyes"; then
! TARGET_ARCH="-march=pentium"
else
! TARGET_ARCH="-mcpu=pentium"
fi
fi
if test "X$allegro_cv_support_fomit_frame_pointer" = "Xyes"; then
CFLAGS="$TARGET_ARCH -O2 -funroll-loops -ffast-math -fomit-frame-pointer $WFLAGS"
else
--- 183,212 ----
else
WFLAGS="-Wall"
fi
!
! dnl Intel machine specific optimizations
! if test "$allegro_cv_support_asm" = i386; then
!
TARGET_ARCH=
if test "X$allegro_exclusive_optimizations" = "Xyes"; then
! OPT_SWITCH="-march="
else
! OPT_SWITCH="-mcpu="
! fi
!
! if test "X$allegro_pentium_optimizations" = "Xyes"; then
! TARGET_ARCH=$OPT_SWITCH"pentium"
! fi
! if test "X$allegro_k6_optimizations" = "Xyes"; then
! TARGET_ARCH=$OPT_SWITCH"k6"
fi
+ if test "X$allegro_pentiumpro_optimizations" = "Xyes"; then
+ TARGET_ARCH=$OPT_SWITCH"i686"
+ fi
+ else
+ TARGET_ARCH=
fi
+
if test "X$allegro_cv_support_fomit_frame_pointer" = "Xyes"; then
CFLAGS="$TARGET_ARCH -O2 -funroll-loops -ffast-math -fomit-frame-pointer $WFLAGS"
else