3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 03:07:07 +00:00

VS2017 SSE4 intrinsics build fix

This commit is contained in:
Christoph M. Wintersteiger 2017-03-24 14:23:39 +00:00
parent e9cd4d1057
commit 7f9c37e19d

View file

@ -52,10 +52,8 @@ Revision History:
#ifdef USE_INTRINSICS
#include <emmintrin.h>
#ifdef __SSE4_1__
#include <smmintrin.h>
#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;