cpu: Don't assert on branch target addresses
authorHsuan Hsu <hsuan.hsu@mediatek.com>
Thu, 30 Apr 2020 10:45:33 +0000 (18:45 +0800)
committerHsuan Hsu <kugwa2000@gmail.com>
Fri, 1 May 2020 04:45:31 +0000 (04:45 +0000)
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 <hsuan.hsu@mediatek.com>
Signed-off-by: Howard Wang <Howard.Wang@mediatek.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28347
Reviewed-by: Trivikram Reddy <tvreddy@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/cpu/pred/ltage.cc
src/cpu/pred/multiperspective_perceptron.cc
src/cpu/pred/multiperspective_perceptron_tage.cc
src/cpu/pred/tage.cc
src/cpu/pred/tage_sc_l.cc

index a2cc56a9e3a97f2caed2a61fc484c172625301ca..68a6db72af1c131df0a3d1703d03ed3e6382e98a 100644 (file)
@@ -95,8 +95,6 @@ LTAGE::update(ThreadID tid, Addr branch_pc, bool taken, void* bp_history,
 
     LTageBranchInfo* bi = static_cast<LTageBranchInfo*>(bp_history);
 
-    assert(corrTarget != MaxAddr);
-
     if (squashed) {
         if (tage->isSpeculativeUpdateEnabled()) {
             // This restores the global history, then update it
index d081b493c872981e196b13613e58043ed1324aaa..6582197aad4bf44df9d525642fa08f4c68588f28 100644 (file)
@@ -613,7 +613,6 @@ MultiperspectivePerceptron::update(ThreadID tid, Addr instPC, bool taken,
 {
     assert(bp_history);
     MPPBranchInfo *bi = static_cast<MPPBranchInfo*>(bp_history);
-    assert(corrTarget != MaxAddr);
     if (squashed) {
         //delete bi;
         return;
index 3ef5f4f39de387b89a8b80971f7965beffb9a9b8..a54f37c15394f1d31125f30a37c6258668c2ea6d 100644 (file)
@@ -605,8 +605,6 @@ MultiperspectivePerceptronTAGE::update(ThreadID tid, Addr instPC, bool taken,
     assert(bp_history);
     MPPTAGEBranchInfo *bi = static_cast<MPPTAGEBranchInfo*>(bp_history);
 
-    assert(corrTarget != MaxAddr);
-
     if (squashed) {
         if (tage->isSpeculativeUpdateEnabled()) {
             // This restores the global history, then update it
index 790653241987932a721b319f2c2cfc59caf4d280..d7c50f0d157d72cca7d35ae3a6068dcec13133d2 100644 (file)
@@ -58,8 +58,6 @@ TAGE::update(ThreadID tid, Addr branch_pc, bool taken, void* bp_history,
     TageBranchInfo *bi = static_cast<TageBranchInfo*>(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.
index de7c2f22c626f75ef96d70c4d1c6d08b6a7f841d..cbd9a45561d7d5142bc8483bdc8c918680cf3ebc 100644 (file)
@@ -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<TAGE_SC_L_TAGE::BranchInfo *>(bi->tageBranchInfo);
 
-    assert(corrTarget != MaxAddr);
-
     if (squashed) {
         if (tage->isSpeculativeUpdateEnabled()) {
             // This restores the global history, then update it