From e0043f8dbe926ed5bfadb504b0a69b1a1fbfcede Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 13 Aug 2011 13:36:37 -0700 Subject: O3: At the end of an instruction, force fetchAddr to something sensible. 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 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh index 545969d82..d186768d8 100644 --- a/src/cpu/o3/fetch_impl.hh +++ b/src/cpu/o3/fetch_impl.hh @@ -1342,6 +1342,8 @@ DefaultFetch::fetch(bool &status_change) thisPC = nextPC; if (newMacro) { + fetchAddr = thisPC.instAddr() & BaseCPU::PCMask; + blkOffset = (fetchAddr - cacheDataPC[tid]) / instSize; pcOffset = 0; curMacroop = NULL; } -- cgit v1.2.3