summaryrefslogtreecommitdiff
path: root/src/arch/x86/predecoder.hh
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/arch/x86/predecoder.hh
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/arch/x86/predecoder.hh')
-rw-r--r--src/arch/x86/predecoder.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/x86/predecoder.hh b/src/arch/x86/predecoder.hh
index 3c858f061..f34b66364 100644
--- a/src/arch/x86/predecoder.hh
+++ b/src/arch/x86/predecoder.hh
@@ -195,12 +195,12 @@ namespace X86ISA
//Use this to give data to the predecoder. This should be used
//when there is control flow.
- void moreBytes(Addr pc, Addr fetchPC, Addr off, MachInst data)
+ void moreBytes(Addr pc, Addr fetchPC, MachInst data)
{
+ DPRINTF(Predecoder, "Getting more bytes.\n");
basePC = fetchPC;
- offset = off;
+ offset = (fetchPC >= pc) ? 0 : pc - fetchPC;
fetchChunk = data;
- assert(off < sizeof(MachInst));
outOfBytes = false;
process();
}