Use global variable in gv_zeroupper

This commit is contained in:
Nekotekina 2022-01-20 21:15:40 +03:00
parent 17b1a34ebf
commit 628354ba92

View File

@ -590,10 +590,12 @@ inline void gv_unset_zeroing_denormals()
#endif
}
inline bool g_use_avx = utils::has_avx();
inline void gv_zeroupper()
{
#if defined(ARCH_X64)
if (!utils::has_avx())
if (!g_use_avx)
return;
#if defined(_M_X64)
_mm256_zeroupper();