changeset f1a9f7f6e7c6 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=f1a9f7f6e7c6
description:
o3: handle fetch with no active threads correctly.
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.
diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
src/cpu/o3/fetch_impl.hh | 5 ++++-
diffs (15 lines):
diff -r e5c792a67b3d -r f1a9f7f6e7c6 src/cpu/o3/fetch_impl.hh
--- a/src/cpu/o3/fetch_impl.hh Wed Apr 15 23:10:43 2009 -0700
+++ b/src/cpu/o3/fetch_impl.hh Wed Apr 15 23:12:00 2009 -0700
@@ -1326,7 +1326,10 @@
}
} 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 ||
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev