Use Select in CheckFlagPipeline.
Some checks failed
Build Android / build_android (apk) (push) Has been cancelled
Build Android / build_android (libretro) (push) Has been cancelled
Build iOS / build_ios (push) Has been cancelled
Build JavaScript / build_js (push) Has been cancelled
Build Linux / build_linux (push) Has been cancelled
Build Linux ARM32 / build_linux_arm32 (push) Has been cancelled
Build Linux ARM64 / build_linux_arm64 (push) Has been cancelled
Build macOS / build_macos (push) Has been cancelled
Build Windows / build_windows (x86_32, Visual Studio 16 2019, installer32.nsi, win32_msvc2019, Win32) (push) Has been cancelled
Build Windows / build_windows (x86_64, Visual Studio 16 2019, installer64.nsi, win64_msvc2019_64, x64) (push) Has been cancelled
Check Format / run_clangformat (push) Has been cancelled
Build Windows Psf / build_windows_psf (off, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Has been cancelled
Build Windows Psf / build_windows_psf (on, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Has been cancelled

This commit is contained in:
Jean-Philip Desjardins 2025-02-04 11:14:55 -05:00
parent e5563e86c9
commit fbe1d81dfa
2 changed files with 14 additions and 16 deletions

View file

@ -1807,8 +1807,6 @@ void VUShared::CheckFlagPipeline(const FLAG_PIPEINFO& pipeInfo, CMipsJitter* cod
//the flag register every time (pipeTimes[i] <= (pipeTime + relativePipeTime))
for(unsigned int i = 0; i < FLAG_PIPELINE_SLOTS; i++)
{
codeGen->PushRelAddrRef(pipeInfo.timeArray);
//Compute index into array
codeGen->PushRel(pipeInfo.index);
codeGen->PushCst(i);
@ -1816,28 +1814,28 @@ void VUShared::CheckFlagPipeline(const FLAG_PIPEINFO& pipeInfo, CMipsJitter* cod
codeGen->PushCst(FLAG_PIPELINE_SLOTS - 1);
codeGen->And();
codeGen->PushRelAddrRef(pipeInfo.timeArray);
codeGen->PushIdx(1);
codeGen->LoadFromRefIdx();
codeGen->PushRel(offsetof(CMIPS, m_State.pipeTime));
codeGen->PushCst(relativePipeTime);
codeGen->Add();
codeGen->BeginIf(Jitter::CONDITION_LE);
{
codeGen->PushRelAddrRef(pipeInfo.valueArray);
codeGen->Cmp(Jitter::CONDITION_LE);
//Compute index into array
codeGen->PushRel(pipeInfo.index);
codeGen->PushCst(i);
codeGen->Add();
codeGen->PushCst(FLAG_PIPELINE_SLOTS - 1);
codeGen->And();
//True branch
codeGen->PushRelAddrRef(pipeInfo.valueArray);
codeGen->PushIdx(2);
codeGen->LoadFromRefIdx();
codeGen->LoadFromRefIdx();
//False branch
codeGen->PushRel(pipeInfo.value);
codeGen->PullRel(pipeInfo.value);
}
codeGen->EndIf();
codeGen->Select();
codeGen->PullRel(pipeInfo.value);
codeGen->PullTop();
}
}