From cfae2cc254037fab1acb290d133625b4f6e1d710 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 9 Mar 2022 06:38:46 -0800 Subject: Use proper macros instead of magic numbers --- core/fpu_ctrl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpu_ctrl.cpp') 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 #endif #ifdef HAVE_SSE_INTRINSICS -#include +#include #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) -- cgit v1.2.3