Merge pull request #8992 from Sintendo/fselx-avx
Jit64: Avoid unnecessary MOVAPS instructions
This commit is contained in:
commit
6d0bc03e00
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue