diff --git a/src/util/hwf.cpp b/src/util/hwf.cpp index ac39db71a..f8e4ff69b 100644 --- a/src/util/hwf.cpp +++ b/src/util/hwf.cpp @@ -52,10 +52,8 @@ Revision History: #ifdef USE_INTRINSICS #include -#ifdef __SSE4_1__ #include #endif -#endif hwf_manager::hwf_manager() : m_mpz_manager(m_mpq_manager) @@ -306,7 +304,9 @@ void hwf_manager::round_to_integral(mpf_rounding_mode rm, hwf const & x, hwf & o // According to the Intel Architecture manual, the x87-instrunction FRNDINT is the // same in 32-bit and 64-bit mode. The _mm_round_* intrinsics are SSE4 extensions. #ifdef _WINDOWS -#ifdef USE_INTRINSICS +#if defined(USE_INTRINSICS) && \ + (defined(_WINDOWS) && defined(__AVX__)) || \ + (!defined(_WINDOWS) && defined(__SSE4_1__) ) switch (rm) { case 0: _mm_store_sd(&o.value, _mm_round_pd(_mm_set_sd(x.value), _MM_FROUND_TO_NEAREST_INT)); break; case 2: _mm_store_sd(&o.value, _mm_round_pd(_mm_set_sd(x.value), _MM_FROUND_TO_POS_INF)); break;