Enabled SSE2 intrinsics
authorSam Lantinga <slouken@libsdl.org>
Fri, 17 Aug 2007 06:41:20 +0000
changeset 2264f7f80b822c1f
parent 2263 900c35d8e8fd
child 2265 265bb136af92
Enabled SSE2 intrinsics
VisualC/SDL/SDL.vcproj
configure.in
     1.1 --- a/VisualC/SDL/SDL.vcproj	Fri Aug 17 06:40:12 2007 +0000
     1.2 +++ b/VisualC/SDL/SDL.vcproj	Fri Aug 17 06:41:20 2007 +0000
     1.3 @@ -47,7 +47,7 @@
     1.4  				Name="VCCLCompilerTool"
     1.5  				Optimization="0"
     1.6  				AdditionalIncludeDirectories="..\..\include"
     1.7 -				PreprocessorDefinitions="_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__MMX__;__3dNOW__;__SSE__"
     1.8 +				PreprocessorDefinitions="_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__MMX__;__3dNOW__;__SSE__;__SSE2__"
     1.9  				RuntimeLibrary="2"
    1.10  				BufferSecurityCheck="false"
    1.11  				UsePrecompiledHeader="0"
    1.12 @@ -145,7 +145,7 @@
    1.13  				InlineFunctionExpansion="1"
    1.14  				EnableIntrinsicFunctions="false"
    1.15  				AdditionalIncludeDirectories="..\..\include"
    1.16 -				PreprocessorDefinitions="NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__MMX__;__3dNOW__;__SSE__"
    1.17 +				PreprocessorDefinitions="NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__MMX__;__3dNOW__;__SSE__;__SSE2__"
    1.18  				StringPooling="true"
    1.19  				RuntimeLibrary="2"
    1.20  				BufferSecurityCheck="false"
     2.1 --- a/configure.in	Fri Aug 17 06:40:12 2007 +0000
     2.2 +++ b/configure.in	Fri Aug 17 06:41:20 2007 +0000
     2.3 @@ -356,6 +356,32 @@
     2.4          fi
     2.5      fi
     2.6  
     2.7 +    AC_ARG_ENABLE(sse2,
     2.8 +AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=yes]]]),
     2.9 +                  , enable_sse2=yes)
    2.10 +    if test x$enable_sse2 = xyes; then
    2.11 +        save_CFLAGS="$CFLAGS"
    2.12 +        have_gcc_sse2=no
    2.13 +        AC_MSG_CHECKING(for GCC -msse2 option)
    2.14 +        sse2_CFLAGS="-msse2"
    2.15 +        CFLAGS="$save_CFLAGS $sse2_CFLAGS"
    2.16 +
    2.17 +        AC_TRY_COMPILE([
    2.18 +        #include <emmintrin.h>
    2.19 +        #ifndef __SSE2__
    2.20 +        #error Assembler CPP flag not enabled
    2.21 +        #endif
    2.22 +        ],[
    2.23 +        ],[
    2.24 +        have_gcc_sse2=yes
    2.25 +        ])
    2.26 +        AC_MSG_RESULT($have_gcc_sse2)
    2.27 +
    2.28 +        if test x$have_gcc_sse2 = xyes; then
    2.29 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS"
    2.30 +        fi
    2.31 +    fi
    2.32 +
    2.33      AC_ARG_ENABLE(altivec,
    2.34  AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
    2.35                    , enable_altivec=yes)