From f478f162699b3cf8dd237f283e845343eafef510 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 9 May 2024 10:55:38 +0930 Subject: [PATCH] Core: Clear FP Status flag in recompiler on BC1FL and BC1TL --- .../N64System/Recompiler/x86/x86RecompilerOps.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp index 3c3816ed6..fc22d204b 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp @@ -785,6 +785,8 @@ void CX86RecompilerOps::Compile_BranchLikely(RecompilerBranchCompare CompareType if (CompareType == RecompilerBranchCompare_COP1BCF || CompareType == RecompilerBranchCompare_COP1BCT) { CompileCop1Test(); + asmjit::x86::Gp StatusReg = m_RegWorkingSet.Map_FPStatusReg(); + m_Assembler.and_(StatusReg, (uint32_t)(~0x0003F000)); } if (!g_System->bLinkBlocks() || (m_CompilePC & 0xFFC) == 0xFFC) {