From f1ecc2c50d0976f3d8f0eaf805cbc399c0780d8b Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Thu, 23 Apr 2020 22:38:12 +0200 Subject: [PATCH] Don't enable SSE2 optimizations when using VC9 and older compiler --- pngpriv.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pngpriv.h b/pngpriv.h index d734f9746..35095bea6 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -211,7 +211,10 @@ * enable SSE optimizations. This means that these optimizations will * be off by default. See contrib/intel for more details. */ -# if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \ +# if defined(_MSC_VER) && _MSC_VER <= 1500 + // Don't enable for VC9 and older: missing include file immintrin.h +# define PNG_INTEL_SSE_OPT 0 +# elif defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \ defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \ (defined(_M_IX86_FP) && _M_IX86_FP >= 2) # define PNG_INTEL_SSE_OPT 1