summaryrefslogtreecommitdiff
path: root/src/arch/power/predecoder.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-11-15 19:37:03 -0800
committerGabe Black <gblack@eecs.umich.edu>2010-11-15 19:37:03 -0800
commit8b9b85e92cde81ef9eb0cf6595be59c96fd13f97 (patch)
treecf5a39118cebc1595f27072b26dd3dd6b3a2e140 /src/arch/power/predecoder.hh
parent776c07591797ccd103619de111ec27df04f96bb3 (diff)
downloadgem5-8b9b85e92cde81ef9eb0cf6595be59c96fd13f97.tar.xz
O3: Make O3 support variably lengthed instructions.
Diffstat (limited to 'src/arch/power/predecoder.hh')
-rw-r--r--src/arch/power/predecoder.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/arch/power/predecoder.hh b/src/arch/power/predecoder.hh
index b1f2b6e38..431c5d1b7 100644
--- a/src/arch/power/predecoder.hh
+++ b/src/arch/power/predecoder.hh
@@ -51,10 +51,11 @@ class Predecoder
// The extended machine instruction being generated
ExtMachInst emi;
+ bool emiIsReady;
public:
Predecoder(ThreadContext * _tc)
- : tc(_tc)
+ : tc(_tc), emiIsReady(false)
{
}
@@ -78,6 +79,7 @@ class Predecoder
void
reset()
{
+ emiIsReady = false;
}
// Use this to give data to the predecoder. This should be used
@@ -86,6 +88,7 @@ class Predecoder
moreBytes(const PCState &pc, Addr fetchPC, MachInst inst)
{
emi = inst;
+ emiIsReady = true;
}
// Use this to give data to the predecoder. This should be used
@@ -105,13 +108,14 @@ class Predecoder
bool
extMachInstReady()
{
- return true;
+ return emiIsReady;
}
// This returns a constant reference to the ExtMachInst to avoid a copy
const ExtMachInst &
getExtMachInst(PCState &pcState)
{
+ emiIsReady = false;
return emi;
}
};