From 45e52e1d2a0628102725fc8795b50e93b4d8ace2 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 17 Oct 2024 14:12:46 +1030 Subject: [PATCH] Core: in SPECIAL_SYSCALL, SPECIAL_BREAK only exit the block is the stage is PIPELINE_STAGE_NORMAL --- .../N64System/Recompiler/x86/x86RecompilerOps.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp index de6bcbc8b..a67e99a1d 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp @@ -4639,14 +4639,20 @@ void CX86RecompilerOps::SPECIAL_SYSCALL() { m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + g_System->CountPerOp()); CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_DoSysCall, true, nullptr); - m_PipelineStage = PIPELINE_STAGE_END_BLOCK; + if (m_PipelineStage == PIPELINE_STAGE_NORMAL) + { + m_PipelineStage = PIPELINE_STAGE_END_BLOCK; + } } void CX86RecompilerOps::SPECIAL_BREAK() { m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + g_System->CountPerOp()); CompileExit(m_CompilePC, m_CompilePC, m_RegWorkingSet, ExitReason_Break, true, nullptr); - m_PipelineStage = PIPELINE_STAGE_END_BLOCK; + if (m_PipelineStage == PIPELINE_STAGE_NORMAL) + { + m_PipelineStage = PIPELINE_STAGE_END_BLOCK; + } } void CX86RecompilerOps::SPECIAL_SYNC()