include/SDL_cpuinfo.h
changeset 11330 6ae35c5f7f7b
parent 10835 0e9e7a128391
child 11698 c5ae532b96d0
     1.1 --- a/include/SDL_cpuinfo.h	Sat Aug 19 02:23:50 2017 -0700
     1.2 +++ b/include/SDL_cpuinfo.h	Sat Aug 19 03:07:44 2017 -0700
     1.3 @@ -33,6 +33,12 @@
     1.4  /* Need to do this here because intrin.h has C++ code in it */
     1.5  /* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
     1.6  #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
     1.7 +#ifdef __clang__
     1.8 +/* Many of the intrinsics SDL uses are not implemented by clang with Visual Studio */
     1.9 +#undef __MMX__
    1.10 +#undef __SSE__
    1.11 +#undef __SSE2__
    1.12 +#else
    1.13  #include <intrin.h>
    1.14  #ifndef _WIN64
    1.15  #define __MMX__
    1.16 @@ -40,6 +46,7 @@
    1.17  #endif
    1.18  #define __SSE__
    1.19  #define __SSE2__
    1.20 +#endif /* __clang__ */
    1.21  #elif defined(__MINGW64_VERSION_MAJOR)
    1.22  #include <intrin.h>
    1.23  #else