diff options
Diffstat (limited to 'src/arch/mips/predecoder.hh')
-rw-r--r-- | src/arch/mips/predecoder.hh | 109 |
1 files changed, 59 insertions, 50 deletions
diff --git a/src/arch/mips/predecoder.hh b/src/arch/mips/predecoder.hh index 01e2ee768..c20fe1f5f 100644 --- a/src/arch/mips/predecoder.hh +++ b/src/arch/mips/predecoder.hh @@ -40,57 +40,66 @@ class ThreadContext; namespace MipsISA { - class Predecoder + +class Predecoder +{ + protected: + ThreadContext * tc; + //The extended machine instruction being generated + ExtMachInst emi; + + public: + Predecoder(ThreadContext * _tc) : tc(_tc) + {} + + ThreadContext *getTC() + { + return tc; + } + + void + setTC(ThreadContext *_tc) + { + tc = _tc; + } + + void + process() { - protected: - ThreadContext * tc; - //The extended machine instruction being generated - ExtMachInst emi; - - public: - Predecoder(ThreadContext * _tc) : tc(_tc) - {} - - ThreadContext * getTC() - { - return tc; - } - - void setTC(ThreadContext * _tc) - { - tc = _tc; - } - - void process() - { - } - - void reset() - {} - - //Use this to give data to the predecoder. This should be used - //when there is control flow. - void moreBytes(Addr pc, Addr fetchPC, MachInst inst) - { - emi = inst; - } - - bool needMoreBytes() - { - return true; - } - - bool extMachInstReady() - { - return true; - } - - //This returns a constant reference to the ExtMachInst to avoid a copy - const ExtMachInst & getExtMachInst() - { - return emi; - } - }; + } + + void + reset() + {} + + //Use this to give data to the predecoder. This should be used + //when there is control flow. + void + moreBytes(Addr pc, Addr fetchPC, MachInst inst) + { + emi = inst; + } + + bool + needMoreBytes() + { + return true; + } + + bool + extMachInstReady() + { + return true; + } + + //This returns a constant reference to the ExtMachInst to avoid a copy + const ExtMachInst & + getExtMachInst() + { + return emi; + } +}; + }; #endif // __ARCH_MIPS_PREDECODER_HH__ |