Skip to content

Commit

Permalink
Use Select in CheckFlagPipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpd002 committed Jan 30, 2025
1 parent 27c91c6 commit db0002c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
38 changes: 18 additions & 20 deletions Source/ee/VUShared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1807,37 +1807,35 @@ 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);
codeGen->Add();
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->Cmp(Jitter::CONDITION_LE);

//True branch
codeGen->PushRelAddrRef(pipeInfo.valueArray);
codeGen->PushIdx(2);
codeGen->LoadFromRefIdx();

//False branch
codeGen->PushRel(pipeInfo.value);

codeGen->BeginIf(Jitter::CONDITION_LE);
{
codeGen->PushRelAddrRef(pipeInfo.valueArray);

//Compute index into array
codeGen->PushRel(pipeInfo.index);
codeGen->PushCst(i);
codeGen->Add();
codeGen->PushCst(FLAG_PIPELINE_SLOTS - 1);
codeGen->And();

codeGen->LoadFromRefIdx();

codeGen->PullRel(pipeInfo.value);
}
codeGen->EndIf();
codeGen->Select();

codeGen->PullRel(pipeInfo.value);
codeGen->PullTop();
}
}

Expand Down

0 comments on commit db0002c

Please sign in to comment.