JitArm64: Track singles in frspx.

This commit is contained in:
degasus 2016-02-11 11:14:12 +01:00
parent 0efdd5cacd
commit 5506295123
1 changed files with 15 additions and 4 deletions

View File

@ -169,11 +169,22 @@ void JitArm64::frspx(UGeckoInstruction inst)
u32 b = inst.FB, d = inst.FD;
ARM64Reg VB = fpr.R(b, REG_IS_LOADED);
ARM64Reg VD = fpr.RW(d, REG_DUP);
if (fpr.IsSingle(b))
{
// Source is already in single precision, so no need to do anything but to copy to PSR1.
ARM64Reg VB = fpr.R(b, REG_IS_LOADED_SINGLE);
ARM64Reg VD = fpr.RW(d, REG_DUP_SINGLE);
m_float_emit.FCVT(32, 64, EncodeRegToDouble(VD), EncodeRegToDouble(VB));
m_float_emit.FCVT(64, 32, EncodeRegToDouble(VD), EncodeRegToDouble(VD));
if (b != d)
m_float_emit.FMOV(EncodeRegToSingle(VD), EncodeRegToSingle(VB));
}
else
{
ARM64Reg VB = fpr.R(b, REG_IS_LOADED);
ARM64Reg VD = fpr.RW(d, REG_DUP_SINGLE);
m_float_emit.FCVT(32, 64, EncodeRegToDouble(VD), EncodeRegToDouble(VB));
}
}
void JitArm64::fcmpX(UGeckoInstruction inst)