projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bbd74e
)
O3: At the end of an instruction, force fetchAddr to something sensible.
author
Gabe Black
<gblack@eecs.umich.edu>
Sat, 13 Aug 2011 20:36:37 +0000
(13:36 -0700)
committer
Gabe Black
<gblack@eecs.umich.edu>
Sat, 13 Aug 2011 20:36:37 +0000
(13:36 -0700)
It's possible (though until now very unlikely) for fetchAddr to get out of
sync with the actual PC of the current instruction. This change forcefull
resets fetchAddr at the end of every instruction.
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 545969d828e66661ec37a5019588756f4b694a80..d186768d85e9fe96d396f82c40becc24165ad3ec 100644
(file)
--- a/
src/cpu/o3/fetch_impl.hh
+++ b/
src/cpu/o3/fetch_impl.hh
@@
-1342,6
+1342,8
@@
DefaultFetch<Impl>::fetch(bool &status_change)
thisPC = nextPC;
if (newMacro) {
+ fetchAddr = thisPC.instAddr() & BaseCPU::PCMask;
+ blkOffset = (fetchAddr - cacheDataPC[tid]) / instSize;
pcOffset = 0;
curMacroop = NULL;
}