mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
build: Fix test for SSE4.1 intrinsics
This change uses the `_mm_blend_epi16` SSE4.1 function used in our code and fixes false-positive cases, for example, when CXXFLAGS="-mno-sse4.1" provided.
This commit is contained in:
parent
2b260eadf7
commit
6ec1ca7c85
1 changed files with 4 additions and 3 deletions
|
@ -504,11 +504,12 @@ TEMP_CXXFLAGS="$CXXFLAGS"
|
||||||
CXXFLAGS="$SSE41_CXXFLAGS $CXXFLAGS"
|
CXXFLAGS="$SSE41_CXXFLAGS $CXXFLAGS"
|
||||||
AC_MSG_CHECKING([for SSE4.1 intrinsics])
|
AC_MSG_CHECKING([for SSE4.1 intrinsics])
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
#include <stdint.h>
|
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
]],[[
|
]],[[
|
||||||
__m128i l = _mm_set1_epi32(0);
|
__m128i a = _mm_set1_epi32(0);
|
||||||
return _mm_extract_epi32(l, 3);
|
__m128i b = _mm_set1_epi32(1);
|
||||||
|
__m128i r = _mm_blend_epi16(a, b, 0xFF);
|
||||||
|
return _mm_extract_epi32(r, 3);
|
||||||
]])],
|
]])],
|
||||||
[ AC_MSG_RESULT([yes]); enable_sse41=yes; AC_DEFINE([ENABLE_SSE41], [1], [Define this symbol to build code that uses SSE4.1 intrinsics]) ],
|
[ AC_MSG_RESULT([yes]); enable_sse41=yes; AC_DEFINE([ENABLE_SSE41], [1], [Define this symbol to build code that uses SSE4.1 intrinsics]) ],
|
||||||
[ AC_MSG_RESULT([no])]
|
[ AC_MSG_RESULT([no])]
|
||||||
|
|
Loading…
Reference in a new issue