summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2013-02-15 17:40:08 -0500
committerAli Saidi <Ali.Saidi@ARM.com>2013-02-15 17:40:08 -0500
commit7ae06a3b3bb6c5438cd9cac7f1fe5f8cdb65e07d (patch)
treeb3cebe0edd190a96aa5f546d3db6a2538f2d440e /src
parentb84bd3028c173893101c0c0c188e5f5b16e4fdee (diff)
downloadgem5-7ae06a3b3bb6c5438cd9cac7f1fe5f8cdb65e07d.tar.xz
cpu: fix case with o3 cpu blocking and unblocking decode in cycle
Fix a case in the O3 CPU where the decode stage blocks and unblocks in a single cycle sending both signals to fetch which causes an assert or worse. The previous check could never work before since the status was set to Blocked before a test for the status being Unblocking was executed.
Diffstat (limited to 'src')
-rw-r--r--src/cpu/o3/decode_impl.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cpu/o3/decode_impl.hh b/src/cpu/o3/decode_impl.hh
index cd226017f..f87ec0bfa 100644
--- a/src/cpu/o3/decode_impl.hh
+++ b/src/cpu/o3/decode_impl.hh
@@ -241,7 +241,9 @@ DefaultDecode<Impl>::block(ThreadID tid)
// Set the status to Blocked.
decodeStatus[tid] = Blocked;
- if (decodeStatus[tid] != Unblocking) {
+ if (toFetch->decodeUnblock[tid]) {
+ toFetch->decodeUnblock[tid] = false;
+ } else {
toFetch->decodeBlock[tid] = true;
wroteToTimeBuffer = true;
}