O3: Fix issue w/wbOutstading being decremented multiple times on blocked cache.

If a split load fails on a blocked cache wbOutstanding can be decremented
twice if the first part of the split load succeeds and the second part fails.
Condition the decrementing on not having completed the first part of the load.
This commit is contained in:
Geoffrey Blake 2011-05-23 10:40:19 -05:00
parent 6dd996aabb
commit c223b887fe
3 changed files with 10 additions and 3 deletions

View file

@ -228,7 +228,7 @@ class DefaultIEW
{
if (++wbOutstanding == wbMax)
ableToIssue = false;
DPRINTF(IEW, "wbOutstanding: %i\n", wbOutstanding);
DPRINTF(IEW, "wbOutstanding: %i [sn:%lli]\n", wbOutstanding, sn);
assert(wbOutstanding <= wbMax);
#ifdef DEBUG
wbList.insert(sn);

View file

@ -1221,7 +1221,9 @@ DefaultIEW<Impl>::executeInsts()
// Check if the instruction is squashed; if so then skip it
if (inst->isSquashed()) {
DPRINTF(IEW, "Execute: Instruction was squashed.\n");
DPRINTF(IEW, "Execute: Instruction was squashed. PC: %s, [tid:%i]"
" [sn:%i]\n", inst->pcState(), inst->threadNumber,
inst->seqNum);
// Consider this instruction executed so that commit can go
// ahead and retire the instruction.

View file

@ -804,7 +804,12 @@ LSQUnit<Impl>::read(Request *req, Request *sreqLow, Request *sreqHigh,
++lsqCacheBlocked;
iewStage->decrWb(load_inst->seqNum);
// If the first part of a split access succeeds, then let the LSQ
// handle the decrWb when completeDataAccess is called upon return
// of the requested first part of data
if (!completedFirst)
iewStage->decrWb(load_inst->seqNum);
// There's an older load that's already going to squash.
if (isLoadBlocked && blockedLoadSeqNum < load_inst->seqNum)
return NoFault;