Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9016 from JosJuice/jitarm64-fctiwzx-fcvt
JitArm64: Avoid double rounding in fctiwzx
  • Loading branch information
Tilka committed Aug 8, 2020
2 parents a77977d + 8b4f16a commit 3201944
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/Core/Core/PowerPC/JitArm64/JitArm64_FloatingPoint.cpp
Expand Up @@ -339,8 +339,12 @@ void JitArm64::fctiwzx(UGeckoInstruction inst)
}
else
{
m_float_emit.FCVT(32, 64, EncodeRegToDouble(VD), EncodeRegToDouble(VB));
m_float_emit.FCVTS(EncodeRegToSingle(VD), EncodeRegToSingle(VD), ROUND_Z);
ARM64Reg V1 = gpr.GetReg();

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));
fpr.Unlock(V0);
Expand Down

0 comments on commit 3201944

Please sign in to comment.