diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp index dd41561944..f520520601 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp @@ -437,8 +437,34 @@ void Jit64::fselx(UGeckoInstruction inst) else CMPSD(XMM0, Ra, CMP_NLE); - if (cpu_info.bSSE4_1) + if (cpu_info.bAVX) { + X64Reg src1 = XMM1; + if (Rc.IsSimpleReg()) + { + src1 = Rc.GetSimpleReg(); + } + else + { + MOVAPD(XMM1, Rc); + } + + if (packed) + { + VBLENDVPD(Rd, src1, Rb, XMM0); + return; + } + + VBLENDVPD(XMM1, src1, Rb, XMM0); + } + else if (cpu_info.bSSE4_1) + { + if (packed && d == c) + { + BLENDVPD(Rd, Rb); + return; + } + MOVAPD(XMM1, Rc); BLENDVPD(XMM1, Rb); } 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