# HG changeset patch # User nkeynes # Date 1225423663 0 # Node ID edc494bde24b4975078cc420bad24198781da026 # Parent c5606ea442328519e14fc3b85f9c9ec0924a0b04 Enable sse-math for all platforms --- a/configure Fri Oct 31 03:24:49 2008 +0000 +++ b/configure Fri Oct 31 03:27:43 2008 +0000 @@ -1474,7 +1474,7 @@ --disable-translator Disable the SH4 translator (Enabled by default) --disable-optimized Disable compile-time optimizations (Enabled by default) - --enable-profiled Enable profiling build (implies disable-optimized) + --enable-profiled Enable profiling build --enable-trace Enable generation of IO traces (warning: hurts performance) --enable-watch Enable watchpoints in the debugger (warning: hurts @@ -6647,23 +6647,28 @@ +if test "x$enable_optimized" = "xyes"; then + CFLAGS="-g -O2 -msse2 -mfpmath=sse" + if test "x$enable_profiled" != "xyes"; then + CFLAGS="$CFLAGS -fexceptions -fomit-frame-pointer" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EXCEPTIONS 1 +_ACEOF + + fi + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FASTCALL 1 +_ACEOF + +else + CFLAGS="-g3" +fi + if test "x$enable_profiled" = "xyes"; then - CFLAGS="-g -pg -fprofile-arcs" + CFLAGS="$CFLAGS -pg" LDFLAGS="$LDFLAGS -pg"; -elif test "x$enable_optimized" = "xyes"; then - CFLAGS="-g -O2 -fexceptions -fomit-frame-pointer" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_EXCEPTIONS 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FASTCALL 1 -_ACEOF - -else - CFLAGS="-g3" fi if test "x$GCC" = "xyes"; then --- a/configure.in Fri Oct 31 03:24:49 2008 +0000 +++ b/configure.in Fri Oct 31 03:27:43 2008 +0000 @@ -29,7 +29,7 @@ AS_HELP_STRING( [--disable-optimized], [Disable compile-time optimizations (Enabled by default)]), [true], [enable_optimized=yes] ) AC_ARG_ENABLE( profiled, - AS_HELP_STRING( [--enable-profiled], [Enable profiling build (implies disable-optimized)]), + AS_HELP_STRING( [--enable-profiled], [Enable profiling build]), [if test "$enableval" == "yes"; then enable_profiled=yes; fi] ) @@ -60,17 +60,23 @@ dnl ------------ -if test "x$enable_profiled" = "xyes"; then - CFLAGS="-g -pg -fprofile-arcs" - LDFLAGS="$LDFLAGS -pg"; -elif test "x$enable_optimized" = "xyes"; then - CFLAGS="-g -O2 -fexceptions -fomit-frame-pointer" - AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information]) +if test "x$enable_optimized" = "xyes"; then + CFLAGS="-g -O2 -msse2 -mfpmath=sse" + if test "x$enable_profiled" != "xyes"; then + dnl -fomit-frame-pointer can't be used with -pg + CFLAGS="$CFLAGS -fexceptions -fomit-frame-pointer" + AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information]) + fi AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions]) else CFLAGS="-g3" fi +if test "x$enable_profiled" = "xyes"; then + CFLAGS="$CFLAGS -pg" + LDFLAGS="$LDFLAGS -pg"; +fi + if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -fno-strict-aliasing" fi