From 77cd679756a7ee54cc60ff60cbec5bd6b3931f70 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 5 Dec 2024 17:05:52 +1030 Subject: [PATCH] Core: Fix a bug in CX86RecompilerOps::SPECIAL_DIV --- .../Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp index 282d1e5c8..a2671bc57 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp @@ -5099,6 +5099,7 @@ void CX86RecompilerOps::SPECIAL_DIV() m_Assembler.MoveX86regToVariable(&m_Reg.m_HI.UW[0], "_RegHI->UW[0]", RegRs); if (!m_RegWorkingSet.IsMapped(m_Opcode.rs)) { + RegRsHi = RegRs; m_Assembler.sar(RegRsHi, 31); } m_Assembler.MoveX86regToVariable(&m_Reg.m_HI.UW[1], "_RegHI->UW[1]", RegRsHi);