summaryrefslogtreecommitdiff
path: root/src/cpu/simple/base.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-06-19 18:17:34 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-06-19 18:17:34 +0000
commitea70e6d6daee29e7a4780d4b48f8140220ee2576 (patch)
tree3a494cf9de26a8319acfa6087186d03ad5bafb1b /src/cpu/simple/base.cc
parentd49649279312fe8d05c27a91f94992d8d584c35b (diff)
downloadgem5-ea70e6d6daee29e7a4780d4b48f8140220ee2576.tar.xz
Make branches work by repopulating the predecoder every time through. This is probably fine as far as the predecoder goes, but the simple cpu might want to not refetch something it already has. That reintroduces the self modifying code problem though.
--HG-- extra : convert_revision : 802197e65f8dc1ad657c6b346091e03cb563b0c0
Diffstat (limited to 'src/cpu/simple/base.cc')
-rw-r--r--src/cpu/simple/base.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index b7f60522f..9285aa7b5 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -379,11 +379,11 @@ BaseSimpleCPU::preExecute()
//This should go away once the constructor can be set up properly
predecoder.setTC(thread->getTC());
//If more fetch data is needed, pass it in.
- if(predecoder.needMoreBytes())
- predecoder.moreBytes(thread->readPC(),
- (thread->readPC() & PCMask) + fetchOffset, 0, inst);
- else
- predecoder.process();
+ Addr fetchPC = (thread->readPC() & PCMask) + fetchOffset;
+ //if(predecoder.needMoreBytes())
+ predecoder.moreBytes(thread->readPC(), fetchPC, inst);
+ //else
+ // predecoder.process();
//If an instruction is ready, decode it. Otherwise, we'll have to
//fetch beyond the MachInst at the current pc.