@@ -478,7 +478,7 @@ TransformD64Type TransformD64 = sha256::TransformD64;
478
478
TransformD64Type TransformD64_4way = nullptr ;
479
479
TransformD64Type TransformD64_8way = nullptr ;
480
480
481
- #if defined(USE_ASM) && (defined(__x86_64__) || defined(__amd64__))
481
+ #if defined(USE_ASM) && (defined(__x86_64__) || defined(__amd64__) || defined(__i386__) )
482
482
// We can't use cpuid.h's __get_cpuid as it does not support subleafs.
483
483
void inline cpuid (uint32_t leaf, uint32_t subleaf, uint32_t & a, uint32_t & b, uint32_t & c, uint32_t & d)
484
484
{
@@ -491,12 +491,14 @@ void inline cpuid(uint32_t leaf, uint32_t subleaf, uint32_t& a, uint32_t& b, uin
491
491
std::string SHA256AutoDetect ()
492
492
{
493
493
std::string ret = " standard" ;
494
- #if defined(USE_ASM) && (defined(__x86_64__) || defined(__amd64__))
494
+ #if defined(USE_ASM) && (defined(__x86_64__) || defined(__amd64__) || defined(__i386__) )
495
495
uint32_t eax, ebx, ecx, edx;
496
496
cpuid (1 , 0 , eax, ebx, ecx, edx);
497
497
if ((ecx >> 19 ) & 1 ) {
498
+ #if defined(__x86_64__) || defined(__amd64__)
498
499
Transform = sha256_sse4::Transform;
499
500
TransformD64 = TransformD64Wrapper<sha256_sse4::Transform>;
501
+ #endif
500
502
#if defined(ENABLE_SSE41) && !defined(BUILD_BITCOIN_INTERNAL)
501
503
TransformD64_4way = sha256d64_sse41::Transform_4way;
502
504
ret = " sse4(1way+4way)" ;
0 commit comments