cpu: Fix LTAGE max number of allocations on update
authorPau Cabre <pau.cabre@metempsy.com>
Fri, 9 Nov 2018 23:12:30 +0000 (00:12 +0100)
committerPau Cabre <pau.cabre@metempsy.com>
Sat, 17 Nov 2018 16:59:31 +0000 (16:59 +0000)
The LTAGE paper states that only one TAGE entry can be
allocated when updating

Change-Id: I6cfb4d80ce835e93d4bf5099ef88a7d425abaddd
Signed-off-by: Pau Cabre <pau.cabre@metempsy.com>
Reviewed-on: https://gem5-review.googlesource.com/c/14195
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Ilias Vougioukas <ilias.vougioukas@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/cpu/pred/ltage.cc

index 874fbe41ea4e921f20d6d23d6418116ecc021fa3..8d20d50568ad1d8dbd37936e0e85c34e24da5927 100644 (file)
@@ -579,6 +579,7 @@ LTAGE::update(ThreadID tid, Addr branch_pc, bool taken, void* bp_history,
                     gtable[i][bi->tableIndices[i]].tag = bi->tableTags[i];
                     gtable[i][bi->tableIndices[i]].ctr = (taken) ? 0 : -1;
                     gtable[i][bi->tableIndices[i]].u = 0; //?
+                    break;
                 }
             }
         }