JitArm64: Track single precision in ps_res.

This commit is contained in:
degasus 2016-02-11 11:22:11 +01:00
parent d185d2f704
commit ca091b9e92
1 changed files with 9 additions and 3 deletions

View File

@ -159,10 +159,16 @@ void JitArm64::ps_res(UGeckoInstruction inst)
u32 b = inst.FB, d = inst.FD;
ARM64Reg VB = fpr.R(b, REG_REG);
ARM64Reg VD = fpr.RW(d, REG_REG);
bool singles = fpr.IsSingle(b);
RegType type = singles ? REG_REG_SINGLE : REG_REG;
u8 size = singles ? 32 : 64;
ARM64Reg (*reg_encoder)(ARM64Reg) = singles ? EncodeRegToDouble : EncodeRegToQuad;
ARM64Reg VB = fpr.R(b, type);
ARM64Reg VD = fpr.RW(d, type);
m_float_emit.FRSQRTE(size, reg_encoder(VD), reg_encoder(VB));
m_float_emit.FRSQRTE(64, VD, VB);
fpr.FixSinglePrecision(d);
}