summaryrefslogtreecommitdiff
path: root/src/cpu/o3/scoreboard.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-10-04 11:58:06 -0700
committerGabe Black <gblack@eecs.umich.edu>2010-10-04 11:58:06 -0700
commitd4492190e6bbf709724af28d262b0a681c975ec0 (patch)
treec4054f74080fd09f440ee3b58b7c43860e2dfab2 /src/cpu/o3/scoreboard.hh
parent538acf2082df45da7fcb297e3805eeacdc9cd293 (diff)
downloadgem5-d4492190e6bbf709724af28d262b0a681c975ec0.tar.xz
Alpha: Fix Alpha NumMiscArchRegs constant.
Also add asserts in O3's Scoreboard class to catch bad indexes.
Diffstat (limited to 'src/cpu/o3/scoreboard.hh')
-rw-r--r--src/cpu/o3/scoreboard.hh15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cpu/o3/scoreboard.hh b/src/cpu/o3/scoreboard.hh
index eefff1d8b..b1c2bd026 100644
--- a/src/cpu/o3/scoreboard.hh
+++ b/src/cpu/o3/scoreboard.hh
@@ -111,6 +111,21 @@ class Scoreboard
/** The logical index of the zero register. */
int zeroRegIdx;
+
+ int currentSize;
+
+ void
+ resize(int newSize)
+ {
+ currentSize = newSize;
+ regScoreBoard.resize(newSize);
+ }
+
+ bool
+ indexInBounds(int idx)
+ {
+ return idx < currentSize;
+ }
};
#endif