summaryrefslogtreecommitdiff
path: root/src/arch/mips/predecoder.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-07-21 01:08:53 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-07-21 01:08:53 -0700
commit7548082d3baf578fe984c79f414dbefd96091359 (patch)
tree2992c954757b4116244ce612dd0d7c63a3893f02 /src/arch/mips/predecoder.hh
parentdc0a017ed0ce192b2959ae0cc08522d04a4281a1 (diff)
downloadgem5-7548082d3baf578fe984c79f414dbefd96091359.tar.xz
MIPS: Many style fixes.
White space, commented out code, some other minor fixes.
Diffstat (limited to 'src/arch/mips/predecoder.hh')
-rw-r--r--src/arch/mips/predecoder.hh109
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__