summaryrefslogtreecommitdiff
path: root/src/cpu/pred/btb.cc
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2016-04-06 19:43:31 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2016-04-06 19:43:31 +0100
commitbe28d96510e0e722db83b26f1a12d3f5de979b32 (patch)
tree6a7e1807397f002f51fddb34568b89250fca45c8 /src/cpu/pred/btb.cc
parent8615b27174ae06db4665016c877b1e88031af203 (diff)
downloadgem5-be28d96510e0e722db83b26f1a12d3f5de979b32.tar.xz
Revert power patch sets with unexpected interactions
The following patches had unexpected interactions with the current upstream code and have been reverted for now: e07fd01651f3: power: Add support for power models 831c7f2f9e39: power: Low-power idle power state for idle CPUs 4f749e00b667: power: Add power states to ClockedObject Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> --HG-- extra : amend_source : 0b6fb073c6bbc24be533ec431eb51fbf1b269508
Diffstat (limited to 'src/cpu/pred/btb.cc')
-rw-r--r--src/cpu/pred/btb.cc18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/cpu/pred/btb.cc b/src/cpu/pred/btb.cc
index c7ef1959f..393e52ccf 100644
--- a/src/cpu/pred/btb.cc
+++ b/src/cpu/pred/btb.cc
@@ -35,12 +35,10 @@
DefaultBTB::DefaultBTB(unsigned _numEntries,
unsigned _tagBits,
- unsigned _instShiftAmt,
- unsigned _num_threads)
+ unsigned _instShiftAmt)
: numEntries(_numEntries),
tagBits(_tagBits),
- instShiftAmt(_instShiftAmt),
- log2NumThreads(floorLog2(_num_threads))
+ instShiftAmt(_instShiftAmt)
{
DPRINTF(Fetch, "BTB: Creating BTB object.\n");
@@ -71,12 +69,10 @@ DefaultBTB::reset()
inline
unsigned
-DefaultBTB::getIndex(Addr instPC, ThreadID tid)
+DefaultBTB::getIndex(Addr instPC)
{
// Need to shift PC over by the word offset.
- return ((instPC >> instShiftAmt)
- ^ (tid << (tagShiftAmt - instShiftAmt - log2NumThreads)))
- & idxMask;
+ return (instPC >> instShiftAmt) & idxMask;
}
inline
@@ -89,7 +85,7 @@ DefaultBTB::getTag(Addr instPC)
bool
DefaultBTB::valid(Addr instPC, ThreadID tid)
{
- unsigned btb_idx = getIndex(instPC, tid);
+ unsigned btb_idx = getIndex(instPC);
Addr inst_tag = getTag(instPC);
@@ -110,7 +106,7 @@ DefaultBTB::valid(Addr instPC, ThreadID tid)
TheISA::PCState
DefaultBTB::lookup(Addr instPC, ThreadID tid)
{
- unsigned btb_idx = getIndex(instPC, tid);
+ unsigned btb_idx = getIndex(instPC);
Addr inst_tag = getTag(instPC);
@@ -128,7 +124,7 @@ DefaultBTB::lookup(Addr instPC, ThreadID tid)
void
DefaultBTB::update(Addr instPC, const TheISA::PCState &target, ThreadID tid)
{
- unsigned btb_idx = getIndex(instPC, tid);
+ unsigned btb_idx = getIndex(instPC);
assert(btb_idx < numEntries);