diff options
author | Mitch Hayenga <mitch.hayenga@arm.com> | 2016-04-05 11:48:37 -0500 |
---|---|---|
committer | Mitch Hayenga <mitch.hayenga@arm.com> | 2016-04-05 11:48:37 -0500 |
commit | 1578d2d0b66d995684cee77b3fe527ed0493d41c (patch) | |
tree | 120b81ec01c889a41c26ddbc6e26cb0434db764b /src/cpu/pred/tournament.cc | |
parent | 7bc52af7716168baa5deb28bb88475ddbba5d62a (diff) | |
download | gem5-1578d2d0b66d995684cee77b3fe527ed0493d41c.tar.xz |
cpu: Add an indirect branch target predictor
This patch adds a configurable indirect branch predictor that can be indexed
by a combination of GHR and path history hashes. Implements the functionality
described in:
"Target prediction for indirect jumps" by Chang, Hao, and Patt
http://dl.acm.org/citation.cfm?id=264209
Diffstat (limited to 'src/cpu/pred/tournament.cc')
-rw-r--r-- | src/cpu/pred/tournament.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/pred/tournament.cc b/src/cpu/pred/tournament.cc index ea6be46fa..2dd48a09c 100644 --- a/src/cpu/pred/tournament.cc +++ b/src/cpu/pred/tournament.cc @@ -388,6 +388,12 @@ TournamentBPParams::create() return new TournamentBP(this); } +unsigned +TournamentBP::getGHR(void *bp_history) const +{ + return static_cast<BPHistory *>(bp_history)->globalHistory; +} + #ifdef DEBUG int TournamentBP::BPHistory::newCount = 0; |