Use proper macros instead of magic numbers

This commit is contained in:
Chris Robinson 2022-03-09 06:38:46 -08:00
parent 90db129d60
commit cfae2cc254

View File

@ -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)