mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 02:02:42 +02:00
Merge bitcoin/bitcoin#28893: Fix SSE4.1-related issues
d440f13db0crypto: Guard code with `ENABLE_SSE41` macro (Hennadii Stepanov)6ec1ca7c85build: Fix test for SSE4.1 intrinsics (Hennadii Stepanov) Pull request description: 1. Fix the test for SSE4.1 intrinsics during build system configuration, which currently can be false positive, for example, when `CXXFLAGS="-mno-sse4.1"` provided. This PR fixes the test by adding the `_mm_blend_epi16` SSE4.1 function used in our codebase. 2. Guard `sha_x86_shani.cpp` code with `ENABLE_SSE41` macro as it uses the `_mm_blend_epi16` function from the SSE4.1 instruction set. It is possible that SHA-NI is enabled even when SSE4.1 is disabled, which causes compile errors in the master branch. Closes https://github.com/bitcoin/bitcoin/issues/28864. ACKs for top commit: sipa: utACKd440f13db0willcl-ark: tACKd440f13db0theuni: utACKd440f13db0Tree-SHA512: a6e1e8c94e1b94874ff51846815ef445e6135cbdb01b08eb695b3548115f2340dd835ebe53673ae46a553fe6be4815e68d8642c34235dd7af5106c4b7c9ea6f3
This commit is contained in:
@@ -621,7 +621,7 @@ std::string SHA256AutoDetect(sha256_implementation::UseImplementation use_implem
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(ENABLE_X86_SHANI)
|
||||
#if defined(ENABLE_SSE41) && defined(ENABLE_X86_SHANI)
|
||||
if (have_x86_shani) {
|
||||
Transform = sha256_x86_shani::Transform;
|
||||
TransformD64 = TransformD64Wrapper<sha256_x86_shani::Transform>;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Written and placed in public domain by Jeffrey Walton.
|
||||
// Based on code from Intel, and by Sean Gulley for the miTLS project.
|
||||
|
||||
#ifdef ENABLE_X86_SHANI
|
||||
#if defined(ENABLE_SSE41) && defined(ENABLE_X86_SHANI)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <immintrin.h>
|
||||
|
||||
Reference in New Issue
Block a user