aboutsummaryrefslogtreecommitdiffstats
path: root/core/fpu_ctrl.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-03-09 06:38:46 -0800
committerChris Robinson <[email protected]>2022-03-09 16:11:47 -0800
commitcfae2cc254037fab1acb290d133625b4f6e1d710 (patch)
tree6a1e38d27d15881b2b32dcc7d6bf4d2ba3347bfb /core/fpu_ctrl.cpp
parent90db129d60a8a3ec0ca0591f789d09ba777142ea (diff)
Use proper macros instead of magic numbers
Diffstat (limited to 'core/fpu_ctrl.cpp')
-rw-r--r--core/fpu_ctrl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpu_ctrl.cpp b/core/fpu_ctrl.cpp
index b12f2c96..bc398448 100644
--- a/core/fpu_ctrl.cpp
+++ b/core/fpu_ctrl.cpp
@@ -7,7 +7,7 @@
#include <intrin.h>
#endif
#ifdef HAVE_SSE_INTRINSICS
-#include <xmmintrin.h>
+#include <emmintrin.h>
#endif
#include "cpu_caps.h"
@@ -20,8 +20,8 @@ void FPUCtl::enter() noexcept
#if defined(HAVE_SSE_INTRINSICS)
this->sse_state = _mm_getcsr();
unsigned int sseState{this->sse_state};
- sseState |= 0x8000; /* set flush-to-zero */
- sseState |= 0x0040; /* set denormals-are-zero */
+ sseState &= ~(_MM_FLUSH_ZERO_MASK | _MM_DENORMALS_ZERO_MASK);
+ sseState |= _MM_FLUSH_ZERO_ON | _MM_DENORMALS_ZERO_ON;
_mm_setcsr(sseState);
#elif defined(__GNUC__) && defined(HAVE_SSE)