summaryrefslogtreecommitdiff
path: root/src/arch/mips/faults.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/mips/faults.hh')
-rw-r--r--src/arch/mips/faults.hh96
1 files changed, 80 insertions, 16 deletions
diff --git a/src/arch/mips/faults.hh b/src/arch/mips/faults.hh
index 86c742413..05a86acd7 100644
--- a/src/arch/mips/faults.hh
+++ b/src/arch/mips/faults.hh
@@ -80,6 +80,42 @@ class AlignmentFault : public MipsFault
bool isAlignmentFault() {return true;}
};
+class UnimplementedOpcodeFault : public MipsFault
+{
+ private:
+ static FaultName _name;
+ static FaultVect _vect;
+ static FaultStat _count;
+ public:
+ FaultName name() {return _name;}
+ FaultVect vect() {return _vect;}
+ FaultStat & countStat() {return _count;}
+};
+
+#if !FULL_SYSTEM
+//class PageTableFault : public MipsFault
+//{
+//private:
+// Addr vaddr;
+// static FaultName _name;
+// static FaultVect _vect;
+// static FaultStat _count;
+//public:
+// PageTableFault(Addr va)
+// : vaddr(va) {}
+// FaultName name() {return _name;}
+// FaultVect vect() {return _vect;}
+// FaultStat & countStat() {return _count;}
+// void invoke(ThreadContext * tc);
+//};
+
+static inline Fault genPageTableFault(Addr va)
+{
+ return new PageTableFault(va);
+}
+#endif
+
+
static inline Fault genMachineCheckFault()
{
return new MachineCheckFault;
@@ -100,8 +136,49 @@ class ResetFault : public MipsFault
FaultName name() {return _name;}
FaultVect vect() {return _vect;}
FaultStat & countStat() {return _count;}
+ void invoke(ThreadContext * tc);
};
+class CoprocessorUnusableFault : public MipsFault
+{
+ private:
+ static FaultName _name;
+ static FaultVect _vect;
+ static FaultStat _count;
+ public:
+ FaultName name() {return _name;}
+ FaultVect vect() {return _vect;}
+ FaultStat & countStat() {return _count;}
+ void invoke(ThreadContext * tc);
+};
+
+class ReservedInstructionFault : public MipsFault
+{
+ private:
+ static FaultName _name;
+ static FaultVect _vect;
+ static FaultStat _count;
+ public:
+ FaultName name() {return _name;}
+ FaultVect vect() {return _vect;}
+ FaultStat & countStat() {return _count;}
+ void invoke(ThreadContext * tc);
+};
+
+class ThreadFault : public MipsFault
+{
+ private:
+ static FaultName _name;
+ static FaultVect _vect;
+ static FaultStat _count;
+ public:
+ FaultName name() {return _name;}
+ FaultVect vect() {return _vect;}
+ FaultStat & countStat() {return _count;}
+ void invoke(ThreadContext * tc);
+};
+
+
class ArithmeticFault : public MipsFault
{
protected:
@@ -217,18 +294,6 @@ class ItbAcvFault : public MipsFault
FaultStat & countStat() {return _count;}
};
-class UnimplementedOpcodeFault : public MipsFault
-{
- private:
- static FaultName _name;
- static FaultVect _vect;
- static FaultStat _count;
- public:
- FaultName name() {return _name;}
- FaultVect vect() {return _vect;}
- FaultStat & countStat() {return _count;}
-};
-
class FloatEnableFault : public MipsFault
{
private:
@@ -241,10 +306,8 @@ class FloatEnableFault : public MipsFault
FaultStat & countStat() {return _count;}
};
-class PalFault : public MipsFault
+class IntegerOverflowFault : public MipsFault
{
- protected:
- bool skipFaultingInstruction() {return true;}
private:
static FaultName _name;
static FaultVect _vect;
@@ -255,7 +318,7 @@ class PalFault : public MipsFault
FaultStat & countStat() {return _count;}
};
-class IntegerOverflowFault : public MipsFault
+class DspStateDisabledFault : public MipsFault
{
private:
static FaultName _name;
@@ -265,6 +328,7 @@ class IntegerOverflowFault : public MipsFault
FaultName name() {return _name;}
FaultVect vect() {return _vect;}
FaultStat & countStat() {return _count;}
+ void invoke(ThreadContext * tc);
};
} // MipsISA namespace