Merge pull request #9016 from JosJuice/jitarm64-fctiwzx-fcvt

JitArm64: Avoid double rounding in fctiwzx
This commit is contained in:
Tilka 2020-08-08 17:55:49 +01:00 committed by GitHub
commit 3201944208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -339,8 +339,12 @@ void JitArm64::fctiwzx(UGeckoInstruction inst)
} }
else else
{ {
m_float_emit.FCVT(32, 64, EncodeRegToDouble(VD), EncodeRegToDouble(VB)); ARM64Reg V1 = gpr.GetReg();
m_float_emit.FCVTS(EncodeRegToSingle(VD), EncodeRegToSingle(VD), ROUND_Z);
m_float_emit.FCVTS(V1, EncodeRegToDouble(VB), ROUND_Z);
m_float_emit.FMOV(EncodeRegToSingle(VD), V1);
gpr.Unlock(V1);
} }
m_float_emit.ORR(EncodeRegToDouble(VD), EncodeRegToDouble(VD), EncodeRegToDouble(V0)); m_float_emit.ORR(EncodeRegToDouble(VD), EncodeRegToDouble(VD), EncodeRegToDouble(V0));
fpr.Unlock(V0); fpr.Unlock(V0);