From e98ea20c373ed1de17d4c27f62c7ad52833b085d Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 28 Jan 2015 01:23:14 +0100 Subject: [PATCH] Fix for VS2005 (AVX2 intrinsics) --- lib/zstd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/zstd.c b/lib/zstd.c index 799df03b..61190578 100644 --- a/lib/zstd.c +++ b/lib/zstd.c @@ -66,10 +66,9 @@ #include /* calloc */ #include /* memcpy, memmove */ #include /* debug : printf */ -#include /* AVX2 intrinsics */ #include "zstd_static.h" #if defined(__clang__) || defined(__GNUC__) -# include "fse.c" /* unfortunately due GCC/Clang inlining limitations, this include runs noticeably faster */ +# include "fse.c" /* due to GCC/Clang inlining limitations, including *.c runs noticeably faster */ #else # include "fse_static.h" #endif @@ -78,6 +77,10 @@ /******************************************************** * Compiler specifics *********************************************************/ +#if (!(defined(_MSC_VER) && (_MSC_VER<=1400))) /* exclude Visual 2005 and below */ +# include /* AVX2 intrinsics */ +#endif + #ifdef _MSC_VER /* Visual Studio */ # define FORCE_INLINE static __forceinline # include /* For Visual 2005 */