From c95fe261abab85bee247737a3d171378689891e0 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Sun, 19 Jun 2011 21:43:38 -0400 Subject: 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 --- src/cpu/inorder/resource.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/cpu/inorder/resource.cc') 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(), -- cgit v1.2.3