mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 06:03:23 +00:00
VS2017 SSE4 intrinsics build fix
This commit is contained in:
parent
e9cd4d1057
commit
7f9c37e19d
1 changed files with 3 additions and 3 deletions
|
@ -52,10 +52,8 @@ Revision History:
|
||||||
|
|
||||||
#ifdef USE_INTRINSICS
|
#ifdef USE_INTRINSICS
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
#ifdef __SSE4_1__
|
|
||||||
#include <smmintrin.h>
|
#include <smmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
hwf_manager::hwf_manager() :
|
hwf_manager::hwf_manager() :
|
||||||
m_mpz_manager(m_mpq_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
|
// 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.
|
// same in 32-bit and 64-bit mode. The _mm_round_* intrinsics are SSE4 extensions.
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#ifdef USE_INTRINSICS
|
#if defined(USE_INTRINSICS) && \
|
||||||
|
(defined(_WINDOWS) && defined(__AVX__)) || \
|
||||||
|
(!defined(_WINDOWS) && defined(__SSE4_1__) )
|
||||||
switch (rm) {
|
switch (rm) {
|
||||||
case 0: _mm_store_sd(&o.value, _mm_round_pd(_mm_set_sd(x.value), _MM_FROUND_TO_NEAREST_INT)); break;
|
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;
|
case 2: _mm_store_sd(&o.value, _mm_round_pd(_mm_set_sd(x.value), _MM_FROUND_TO_POS_INF)); break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue