From 55a0a52a39351ccb49493a64625810a171c92d4f Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Thu, 3 Feb 2022 07:22:05 +0000 Subject: [PATCH] Use MSVC intrinsic sqrt() on x86 for XBRZ too. Instead of the inline asm fsqrt instruction. Already being used on x64. Signed-off-by: Rafael Kitover --- src/filters/xBRZ/xbrz.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/filters/xBRZ/xbrz.cpp b/src/filters/xBRZ/xbrz.cpp index 17d7830e..a55c52cd 100644 --- a/src/filters/xBRZ/xbrz.cpp +++ b/src/filters/xBRZ/xbrz.cpp @@ -69,13 +69,6 @@ inline double fastSqrt(double n) #if (defined(__GNUC__) || defined(__clang__)) && (defined(__x86_64__) || defined(__i386__)) __asm__ ("fsqrt" : "+t" (n)); return n; -#elif defined(_MSC_VER) && defined(_M_IX86) - // speeds up xBRZ by about 9% compared to std::sqrt which internally uses - // the same assembler instructions but adds some "fluff" - __asm { - fld n - fsqrt - } #elif defined(_MSC_VER) // On MSVC x64 use intrinsic with /Oi and /fp:fast return sqrt(n);