From 08bdeefe05e740903634333c506e2ab4dfd6eb4a Mon Sep 17 00:00:00 2001 From: Sintendo Date: Sun, 2 Aug 2020 18:07:47 +0200 Subject: [PATCH] Jit64AsmCommon: Use AVX in ConvertDoubleToSingle Using AVX we can eliminate another MOVAPS instruction here. Before: 0F 28 C8 movaps xmm1,xmm0 66 0F DB 0D CF 2C 00 00 pand xmm1,xmmword ptr [1F8D283B220h] After: C5 F9 DB 0D D2 2C 00 00 vpand xmm1,xmm0,xmmword ptr [271835FB220h] --- Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp b/Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp index 57fb829688..ef3fcc067a 100644 --- a/Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp +++ b/Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp @@ -77,8 +77,7 @@ void CommonAsmRoutines::GenConvertDoubleToSingle() else { // We want bits 0, 1 - MOVAPD(XMM1, R(XMM0)); - PAND(XMM1, MConst(double_top_two_bits)); + avx_op(&XEmitter::VPAND, &XEmitter::PAND, XMM1, R(XMM0), MConst(double_top_two_bits)); PSRLQ(XMM1, 32); // And 5 through to 34