src/video/SDL_blit_A.c
branchSDL-1.2
changeset 3973 5fbd763b1c88
parent 3931 d65b4a73c991
child 4159 a1b03ba2fcd0
     1.1 --- a/src/video/SDL_blit_A.c	Sat Jun 16 05:51:51 2007 +0000
     1.2 +++ b/src/video/SDL_blit_A.c	Thu Jun 21 18:20:59 2007 +0000
     1.3 @@ -24,14 +24,30 @@
     1.4  #include "SDL_video.h"
     1.5  #include "SDL_blit.h"
     1.6  
     1.7 +/*
     1.8 +  In Visual C, VC6 has mmintrin.h in the "Processor Pack" add-on.
     1.9 +   Checking if _mm_free is #defined in malloc.h is is the only way to
    1.10 +   determine if the Processor Pack is installed, as far as I can tell.
    1.11 +*/
    1.12 +
    1.13  #if SDL_ASSEMBLY_ROUTINES
    1.14 -#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
    1.15 -#define MMX_ASMBLIT 1
    1.16 -#define GCC_ASMBLIT 1
    1.17 -#elif defined(_MSC_VER) && (_MSC_VER >= 1200) && defined(_M_IX86)
    1.18 -#define MMX_ASMBLIT 1
    1.19 -#define MSVC_ASMBLIT 1
    1.20 -#endif
    1.21 +#  if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
    1.22 +#    define MMX_ASMBLIT 1
    1.23 +#    define GCC_ASMBLIT 1
    1.24 +#  elif defined(_MSC_VER) && defined(_M_IX86)
    1.25 +#    if (_MSC_VER <= 1200)  
    1.26 +#      include <malloc.h>   
    1.27 +#      if defined(_mm_free)
    1.28 +#          define HAVE_MMINTRIN_H 1
    1.29 +#      endif
    1.30 +#    else  /* Visual Studio > VC6 always has mmintrin.h */
    1.31 +#      define HAVE_MMINTRIN_H 1
    1.32 +#    endif
    1.33 +#    if HAVE_MMINTRIN_H
    1.34 +#      define MMX_ASMBLIT 1
    1.35 +#      define MSVC_ASMBLIT 1
    1.36 +#    endif
    1.37 +#  endif
    1.38  #endif /* SDL_ASSEMBLY_ROUTINES */
    1.39  
    1.40  /* Function to check the CPU flags */