From 81e3bfcdc385a4cdb506bb74fc66eec9c2d1bc3e Mon Sep 17 00:00:00 2001 From: rogerchang23424 Date: Thu, 10 Aug 2023 07:21:17 +0800 Subject: [PATCH] cpu: Update src/cpu/pred/bpred_unit.cc Change-Id: I0cf177676d0f9fb9db4b127d5507ba66904739c4 Co-authored-by: Jason Lowe-Power --- src/cpu/pred/bpred_unit.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/cpu/pred/bpred_unit.cc b/src/cpu/pred/bpred_unit.cc index 1bf51afe48..a395e7cad7 100644 --- a/src/cpu/pred/bpred_unit.cc +++ b/src/cpu/pred/bpred_unit.cc @@ -503,12 +503,11 @@ BPredUnit::squash(const InstSeqNum &squashed_sn, "return [sn:%llu] PC: %#x Restoring RAS\n", tid, squashed_sn, hist_it->seqNum, hist_it->pc); - 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()); - } + DPRINTF(Branch, + "[tid:%i] [squash sn:%llu] Restoring top of RAS " + "to: %i, target: %s\n", tid, squashed_sn, + hist_it->RASIndex, + hist_it->RASIndex ? *hist_it->RASTarget.get() : "no RAS"); RAS[tid].restore(hist_it->RASIndex, hist_it->RASTarget.get()); hist_it->usedRAS = false; }