From: Hsuan Hsu Date: Thu, 30 Apr 2020 10:45:33 +0000 (+0800) Subject: cpu: Don't assert on branch target addresses X-Git-Tag: v20.0.0.0~76 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6ddd4aeb3fb08dffeaf7b032d99ccb00d0a0dbc;p=gem5.git cpu: Don't assert on branch target addresses We should assume a branch target can be any address. JIRA: https://gem5.atlassian.net/browse/GEM5-483 Change-Id: I6f6da1f9260d6e8978536967dc7fcf1808965db2 Signed-off-by: Hsuan Hsu Signed-off-by: Howard Wang Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28347 Reviewed-by: Trivikram Reddy Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/cpu/pred/ltage.cc b/src/cpu/pred/ltage.cc index a2cc56a9e..68a6db72a 100644 --- a/src/cpu/pred/ltage.cc +++ b/src/cpu/pred/ltage.cc @@ -95,8 +95,6 @@ LTAGE::update(ThreadID tid, Addr branch_pc, bool taken, void* bp_history, LTageBranchInfo* bi = static_cast(bp_history); - assert(corrTarget != MaxAddr); - if (squashed) { if (tage->isSpeculativeUpdateEnabled()) { // This restores the global history, then update it diff --git a/src/cpu/pred/multiperspective_perceptron.cc b/src/cpu/pred/multiperspective_perceptron.cc index d081b493c..6582197aa 100644 --- a/src/cpu/pred/multiperspective_perceptron.cc +++ b/src/cpu/pred/multiperspective_perceptron.cc @@ -613,7 +613,6 @@ MultiperspectivePerceptron::update(ThreadID tid, Addr instPC, bool taken, { assert(bp_history); MPPBranchInfo *bi = static_cast(bp_history); - assert(corrTarget != MaxAddr); if (squashed) { //delete bi; return; diff --git a/src/cpu/pred/multiperspective_perceptron_tage.cc b/src/cpu/pred/multiperspective_perceptron_tage.cc index 3ef5f4f39..a54f37c15 100644 --- a/src/cpu/pred/multiperspective_perceptron_tage.cc +++ b/src/cpu/pred/multiperspective_perceptron_tage.cc @@ -605,8 +605,6 @@ MultiperspectivePerceptronTAGE::update(ThreadID tid, Addr instPC, bool taken, assert(bp_history); MPPTAGEBranchInfo *bi = static_cast(bp_history); - assert(corrTarget != MaxAddr); - if (squashed) { if (tage->isSpeculativeUpdateEnabled()) { // This restores the global history, then update it diff --git a/src/cpu/pred/tage.cc b/src/cpu/pred/tage.cc index 790653241..d7c50f0d1 100644 --- a/src/cpu/pred/tage.cc +++ b/src/cpu/pred/tage.cc @@ -58,8 +58,6 @@ TAGE::update(ThreadID tid, Addr branch_pc, bool taken, void* bp_history, TageBranchInfo *bi = static_cast(bp_history); TAGEBase::BranchInfo *tage_bi = bi->tageBranchInfo; - assert(corrTarget != MaxAddr); - if (squashed) { // This restores the global history, then update it // and recomputes the folded histories. diff --git a/src/cpu/pred/tage_sc_l.cc b/src/cpu/pred/tage_sc_l.cc index de7c2f22c..cbd9a4556 100644 --- a/src/cpu/pred/tage_sc_l.cc +++ b/src/cpu/pred/tage_sc_l.cc @@ -419,8 +419,6 @@ TAGE_SC_L::update(ThreadID tid, Addr branch_pc, bool taken, void *bp_history, TAGE_SC_L_TAGE::BranchInfo* tage_bi = static_cast(bi->tageBranchInfo); - assert(corrTarget != MaxAddr); - if (squashed) { if (tage->isSpeculativeUpdateEnabled()) { // This restores the global history, then update it