Use immintrin, tweak checks for SSE4, SSSE3

This commit is contained in:
Matt Sarett 2016-02-16 10:53:36 -05:00
parent 577c1f0305
commit 5bc58a0ebc
2 changed files with 6 additions and 7 deletions

View File

@ -14,11 +14,7 @@
#if PNG_INTEL_SSE_OPT > 0
#if defined(_MSC_VER) && defined(_WIN64)
#include <intrin.h>
#else
#include <x86intrin.h>
#endif
#include <immintrin.h>
// Functions in this file look at most 3 pixels (a,b,c) to predict the 4th (d).
// They're positioned like this:

View File

@ -183,9 +183,12 @@
#endif /* PNG_ARM_NEON_OPT > 0 */
#ifndef PNG_INTEL_SSE_OPT
# if defined(__SSE4_1__)
# if defined(__SSE4_1__) || defined(__AVX__)
/* We are not actually using AVX, but checking for AVX is the best
way we can detect SSE4.1 and SSSE3 on MSVC.
*/
# define PNG_INTEL_SSE_OPT 3
# elif defined(__SSE3__) || defined(__SSSE3__)
# elif defined(__SSSE3__)
# define PNG_INTEL_SSE_OPT 2
# elif defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \
(defined(_M_IX86_FP) && _M_IX86_FP >= 2)