summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Hestness <hestness@cs.wisc.edu>2013-01-19 15:14:54 -0600
committerJoel Hestness <hestness@cs.wisc.edu>2013-01-19 15:14:54 -0600
commit1429d2124406440946fbe80a6e9dfe1148f3af91 (patch)
treedf4374a90a4362151821b17b6a2f7cd3056a8a7f /src
parent5b6f972750f8e9288e81f30d69aecfe1f1960f06 (diff)
downloadgem5-1429d2124406440946fbe80a6e9dfe1148f3af91.tar.xz
O3 IEW: Make incrWb and decrWb clearer
Move the increment/decrement of wbOutstanding outside of the comparison in incrWb and decrWb in the IEW. This also fixes a compiler bug with gcc 4.4.7, which incorrectly optimizes "-- ==" as "-=".
Diffstat (limited to 'src')
-rw-r--r--src/cpu/o3/iew.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cpu/o3/iew.hh b/src/cpu/o3/iew.hh
index 5adf32752..1213cf12b 100644
--- a/src/cpu/o3/iew.hh
+++ b/src/cpu/o3/iew.hh
@@ -213,7 +213,8 @@ class DefaultIEW
void incrWb(InstSeqNum &sn)
{
- if (++wbOutstanding == wbMax)
+ ++wbOutstanding;
+ if (wbOutstanding == wbMax)
ableToIssue = false;
DPRINTF(IEW, "wbOutstanding: %i [sn:%lli]\n", wbOutstanding, sn);
assert(wbOutstanding <= wbMax);
@@ -224,8 +225,9 @@ class DefaultIEW
void decrWb(InstSeqNum &sn)
{
- if (wbOutstanding-- == wbMax)
+ if (wbOutstanding == wbMax)
ableToIssue = true;
+ wbOutstanding--;
DPRINTF(IEW, "wbOutstanding: %i [sn:%lli]\n", wbOutstanding, sn);
assert(wbOutstanding >= 0);
#ifdef DEBUG