We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1d94c1 commit ff99568Copy full SHA for ff99568
src/cpu/pred/btb/mbtb.cc
@@ -540,9 +540,10 @@ MBTB::updateBTBEntry(const BTBEntry& entry, const FetchStream &stream)
540
}
541
542
auto entry_to_write = buildUpdatedEntry(entry, existing_ptr, stream, btb_tag);
543
- auto ticked_entry = TickedBTBEntry(entry_to_write, it->tick);
544
- if (stream.exeBranchInfo.pc == ticked_entry.pc && stream.exeTaken) {
545
- ticked_entry.tick = curTick();
+ auto ticked_entry = TickedBTBEntry(entry_to_write, curTick());
+ if (stream.exeBranchInfo.pc != ticked_entry.pc) {
+ // do not update tick if this entry is not for the executed branch
546
+ ticked_entry.tick = it->tick;
547
548
549
if (found) {
0 commit comments