summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resource.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:33 -0400
committerKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:33 -0400
commite2f9266dbfc7ef54f94028eeffa4e40c76ffc17a (patch)
treed97a7706131a6b59fee4727386c21dea51f9d07f /src/cpu/inorder/resource.cc
parent6df63650956387d88f24122c783438553412768f (diff)
downloadgem5-e2f9266dbfc7ef54f94028eeffa4e40c76ffc17a.tar.xz
inorder: update bpred code
clean up control flow to make it easier to understand
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 bdcfbde7d..cad5cfb09 100644
--- a/src/cpu/inorder/resource.cc
+++ b/src/cpu/inorder/resource.cc
@@ -305,8 +305,10 @@ Resource::squash(DynInstPtr inst, int stage_num, InstSeqNum squash_seq_num,
int req_slot_num = req_ptr->getSlot();
- if (resourceEvent[req_slot_num].scheduled())
- unscheduleEvent(req_slot_num);
+ if (latency > 0) {
+ if (resourceEvent[req_slot_num].scheduled())
+ unscheduleEvent(req_slot_num);
+ }
freeSlot(req_slot_num);
}