summaryrefslogtreecommitdiff
path: root/src/arch/sparc/predecoder.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/sparc/predecoder.hh')
-rw-r--r--src/arch/sparc/predecoder.hh13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/arch/sparc/predecoder.hh b/src/arch/sparc/predecoder.hh
index f7c7c90b4..670c547d0 100644
--- a/src/arch/sparc/predecoder.hh
+++ b/src/arch/sparc/predecoder.hh
@@ -49,9 +49,10 @@ class Predecoder
ThreadContext * tc;
// The extended machine instruction being generated
ExtMachInst emi;
+ bool emiIsReady;
public:
- Predecoder(ThreadContext * _tc) : tc(_tc)
+ Predecoder(ThreadContext * _tc) : tc(_tc), emiIsReady(false)
{}
ThreadContext *
@@ -67,7 +68,11 @@ class Predecoder
}
void process() {}
- void reset() {}
+ void
+ reset()
+ {
+ emiIsReady = false;
+ }
// Use this to give data to the predecoder. This should be used
// when there is control flow.
@@ -87,6 +92,7 @@ class Predecoder
emi |= (static_cast<ExtMachInst>(bits(inst, 12, 5))
<< (sizeof(MachInst) * 8));
}
+ emiIsReady = true;
}
bool
@@ -98,13 +104,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;
}
};