Skip to content

Commit

Permalink
chores: range-based invalidation loop
Browse files Browse the repository at this point in the history
  • Loading branch information
branylagaffe committed Aug 5, 2024
1 parent a712e88 commit 59bed80
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions components/BranchPredictor/BTBSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ BTBSet::insert(BTBEntry btbEntry)
void
BTBSet::invalidate(VirtualMemoryAddress anAddress)
{
for (uint32_t i = 0; i < blocks.size(); ++i) {
if (blocks[i].thePC == anAddress && blocks[i].valid) {
// Entry to be invalidated is present
blocks[i].valid = false; // Invalidate
// TODO: Update replacementQueue for invalidation
}
for (auto& block : blocks)
{
if (block.thePC == anAddress && blocks.valid)
block.valid = false;
}
}

0 comments on commit 59bed80

Please sign in to comment.