cpu: Fix segment fault when using debug flags Branch

Change-Id: I36624b93f53aa101a57d51f3b917696cb2809136
This commit is contained in:
Roger Chang
2023-08-09 15:40:37 +08:00
parent 4cac85cb80
commit 97e55fc173

View File

@@ -503,10 +503,12 @@ BPredUnit::squash(const InstSeqNum &squashed_sn,
"return [sn:%llu] PC: %#x Restoring RAS\n", tid,
squashed_sn,
hist_it->seqNum, hist_it->pc);
DPRINTF(Branch,
"[tid:%i] [squash sn:%llu] Restoring top of RAS "
"to: %i, target: %s\n", tid, squashed_sn,
hist_it->RASIndex, *hist_it->RASTarget);
if (hist_it->RASTarget != nullptr) {
DPRINTF(Branch,
"[tid:%i] [squash sn:%llu] Restoring top of RAS "
"to: %i, target: %s\n", tid, squashed_sn,
hist_it->RASIndex, *hist_it->RASTarget.get());
}
RAS[tid].restore(hist_it->RASIndex, hist_it->RASTarget.get());
hist_it->usedRAS = false;
}