mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-31 09:33:06 +00:00
JitArm64: Track singles in ps_sumX.
This commit is contained in:
parent
ca091b9e92
commit
7fd68c8761
@ -211,23 +211,29 @@ void JitArm64::ps_sumX(UGeckoInstruction inst)
|
|||||||
|
|
||||||
bool upper = inst.SUBOP5 == 11;
|
bool upper = inst.SUBOP5 == 11;
|
||||||
|
|
||||||
ARM64Reg VA = fpr.R(a, REG_REG);
|
bool singles = fpr.IsSingle(a) && fpr.IsSingle(b) && fpr.IsSingle(c);
|
||||||
ARM64Reg VB = fpr.R(b, REG_REG);
|
RegType type = singles ? REG_REG_SINGLE : REG_REG;
|
||||||
ARM64Reg VC = fpr.R(c, REG_REG);
|
u8 size = singles ? 32 : 64;
|
||||||
ARM64Reg VD = fpr.RW(d, REG_REG);
|
ARM64Reg (*reg_encoder)(ARM64Reg) = singles ? EncodeRegToDouble : EncodeRegToQuad;
|
||||||
|
|
||||||
|
ARM64Reg VA = fpr.R(a, type);
|
||||||
|
ARM64Reg VB = fpr.R(b, type);
|
||||||
|
ARM64Reg VC = fpr.R(c, type);
|
||||||
|
ARM64Reg VD = fpr.RW(d, type);
|
||||||
ARM64Reg V0 = fpr.GetReg();
|
ARM64Reg V0 = fpr.GetReg();
|
||||||
|
|
||||||
m_float_emit.DUP(64, V0, upper ? VA : VB, upper ? 0 : 1);
|
m_float_emit.DUP(size, reg_encoder(V0), reg_encoder(upper ? VA : VB), upper ? 0 : 1);
|
||||||
if (d != c)
|
if (d != c)
|
||||||
{
|
{
|
||||||
m_float_emit.FADD(64, VD, V0, upper ? VB : VA);
|
m_float_emit.FADD(size, reg_encoder(VD), reg_encoder(V0), reg_encoder(upper ? VB : VA));
|
||||||
m_float_emit.INS(64, VD, upper ? 0 : 1, VC, upper ? 0 : 1);
|
m_float_emit.INS(size, VD, upper ? 0 : 1, VC, upper ? 0 : 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_float_emit.FADD(64, V0, V0, upper ? VB : VA);
|
m_float_emit.FADD(size, reg_encoder(V0), reg_encoder(V0), reg_encoder(upper ? VB : VA));
|
||||||
m_float_emit.INS(64, VD, upper ? 1 : 0, V0, upper ? 1 : 0);
|
m_float_emit.INS(size, VD, upper ? 1 : 0, V0, upper ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
fpr.FixSinglePrecision(d);
|
fpr.FixSinglePrecision(d);
|
||||||
|
|
||||||
fpr.Unlock(V0);
|
fpr.Unlock(V0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user