mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Jit64: Correctly handle NaNs for ps_mulsX
This commit is contained in:
parent
d3180e3516
commit
cbceae9176
@ -98,23 +98,26 @@ void Jit64::ps_muls(UGeckoInstruction inst)
|
|||||||
RCOpArg Ra = fpr.Use(a, RCMode::Read);
|
RCOpArg Ra = fpr.Use(a, RCMode::Read);
|
||||||
RCOpArg Rc = fpr.Use(c, RCMode::Read);
|
RCOpArg Rc = fpr.Use(c, RCMode::Read);
|
||||||
RCX64Reg Rd = fpr.Bind(d, RCMode::Write);
|
RCX64Reg Rd = fpr.Bind(d, RCMode::Write);
|
||||||
RegCache::Realize(Ra, Rc, Rd);
|
RCX64Reg Rc_duplicated = m_accurate_nans ? fpr.Scratch() : fpr.Scratch(XMM1);
|
||||||
|
RegCache::Realize(Ra, Rc, Rd, Rc_duplicated);
|
||||||
|
|
||||||
switch (inst.SUBOP5)
|
switch (inst.SUBOP5)
|
||||||
{
|
{
|
||||||
case 12: // ps_muls0
|
case 12: // ps_muls0
|
||||||
MOVDDUP(XMM1, Rc);
|
MOVDDUP(Rc_duplicated, Rc);
|
||||||
break;
|
break;
|
||||||
case 13: // ps_muls1
|
case 13: // ps_muls1
|
||||||
avx_op(&XEmitter::VSHUFPD, &XEmitter::SHUFPD, XMM1, Rc, Rc, 3);
|
avx_op(&XEmitter::VSHUFPD, &XEmitter::SHUFPD, Rc_duplicated, Rc, Rc, 3);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PanicAlertFmt("ps_muls WTF!!!");
|
PanicAlertFmt("ps_muls WTF!!!");
|
||||||
}
|
}
|
||||||
if (round_input)
|
if (round_input)
|
||||||
Force25BitPrecision(XMM1, R(XMM1), XMM0);
|
Force25BitPrecision(XMM1, R(Rc_duplicated), XMM0);
|
||||||
|
else if (XMM1 != Rc_duplicated)
|
||||||
|
MOVAPD(XMM1, Rc_duplicated);
|
||||||
MULPD(XMM1, Ra);
|
MULPD(XMM1, Ra);
|
||||||
HandleNaNs(inst, XMM1, XMM0, Ra, std::nullopt, Rc);
|
HandleNaNs(inst, XMM1, XMM0, Ra, std::nullopt, Rc_duplicated);
|
||||||
FinalizeSingleResult(Rd, R(XMM1));
|
FinalizeSingleResult(Rd, R(XMM1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user