summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resource.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:38 -0400
committerKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:38 -0400
commitc95fe261abab85bee247737a3d171378689891e0 (patch)
tree75569e5baa06a7bd25870505a48a3ddf24916475 /src/cpu/inorder/resource.cc
parent4c979f9325f0c82f3284ce0fb0cc118d77268cb5 (diff)
downloadgem5-c95fe261abab85bee247737a3d171378689891e0.tar.xz
inorder: bug in mdu
segfault was caused by squashed multiply thats in the process of an event. use isProcessing flag to handle this and cleanup the MDU code
Diffstat (limited to 'src/cpu/inorder/resource.cc')
-rw-r--r--src/cpu/inorder/resource.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc
index 8d3f3daac..a21536676 100644
--- a/src/cpu/inorder/resource.cc
+++ b/src/cpu/inorder/resource.cc
@@ -297,16 +297,18 @@ Resource::setupSquash(DynInstPtr inst, int stage_num, ThreadID tid)
cpu->resPool->scheduleEvent(
(InOrderCPU::CPUEventType)ResourcePool::SquashAll, inst, 0);
}
+
void
Resource::squash(DynInstPtr inst, int stage_num, InstSeqNum squash_seq_num,
ThreadID tid)
{
for (int i = 0; i < width; i++) {
ResReqPtr req_ptr = reqs[i];
+ DynInstPtr inst = req_ptr->getInst();
if (req_ptr->valid &&
- req_ptr->getInst()->readTid() == tid &&
- req_ptr->getInst()->seqNum > squash_seq_num) {
+ inst->readTid() == tid &&
+ inst->seqNum > squash_seq_num) {
DPRINTF(Resource, "[tid:%i]: Squashing [sn:%i].\n",
req_ptr->getInst()->readTid(),