projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb974d5
)
o3: handle fetch with no active threads correctly.
author
Steve Reinhardt
<steve.reinhardt@amd.com>
Thu, 16 Apr 2009 06:12:00 +0000
(23:12 -0700)
committer
Steve Reinhardt
<steve.reinhardt@amd.com>
Thu, 16 Apr 2009 06:12:00 +0000
(23:12 -0700)
This situation can arise now on the first fetch cycle after
the last active thread is halted. It seems easy enough to
deal with when it happens rather than trying to avoid it.
src/cpu/o3/fetch_impl.hh
patch
|
blob
|
history
diff --git
a/src/cpu/o3/fetch_impl.hh
b/src/cpu/o3/fetch_impl.hh
index fcee2daa626e2c4ef8754d85f05b9a53647deb10..c3be74234b6134a3357e1972d9aefd0ef0164dd3 100644
(file)
--- a/
src/cpu/o3/fetch_impl.hh
+++ b/
src/cpu/o3/fetch_impl.hh
@@
-1326,7
+1326,10
@@
DefaultFetch<Impl>::getFetchingThread(FetchPriority &fetch_priority)
}
} else {
std::list<unsigned>::iterator thread = activeThreads->begin();
- assert(thread != activeThreads->end());
+ if (thread == activeThreads->end()) {
+ return -1;
+ }
+
int tid = *thread;
if (fetchStatus[tid] == Running ||