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

2
deps/CodeGen vendored

@ -1 +1 @@
Subproject commit 7744fe0c547cc193d567aa47817a22e24a570390 Subproject commit ff6055c4c97e15d601e8c26e9b872f195627eeca