From 628354ba92a344248a053f4fc0de4f7a6d630819 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Thu, 20 Jan 2022 21:15:40 +0300 Subject: [PATCH] Use global variable in gv_zeroupper --- rpcs3/util/simd.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpcs3/util/simd.hpp b/rpcs3/util/simd.hpp index 0a22a5569b..0b9eddc30c 100644 --- a/rpcs3/util/simd.hpp +++ b/rpcs3/util/simd.hpp @@ -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();