#include "sim/faults.hh"
-// The reasoning behind the name and vect functions is in sim/faults.hh
+// The design of the "name" and "vect" functions is in sim/faults.hh
+
+namespace AlphaISA
+{
typedef const Addr FaultVect;
-class AlphaFault : public FaultBase
+class AlphaFault : public virtual FaultBase
+{
+ public:
+#if FULL_SYSTEM
+ void ev5_trap(ExecContext * xc);
+#endif
+ virtual FaultVect vect() = 0;
+};
+
+class AlphaMachineCheckFault :
+ public MachineCheckFault,
+ public AlphaFault
{
private:
- static FaultName _name;
static FaultVect _vect;
static FaultStat _stat;
public:
- FaultName name() {return _name;}
- virtual FaultVect vect() {return _vect;}
- virtual FaultStat & stat() {return _stat;}
+#if FULL_SYSTEM
+ void ev5_trap(ExecContext * xc);
+#endif
+ FaultVect vect() {return _vect;}
+ FaultStat & stat() {return _stat;}
};
+class AlphaAlignmentFault :
+ public AlignmentFault,
+ public AlphaFault
+{
+ private:
+ static FaultVect _vect;
+ static FaultStat _stat;
+ public:
+#if FULL_SYSTEM
+ void ev5_trap(ExecContext * xc);
+#endif
+ FaultVect vect() {return _vect;}
+ FaultStat & stat() {return _stat;}
+};
+
+static inline Fault genMachineCheckFault()
+{
+ return new AlphaMachineCheckFault;
+}
+
+static inline Fault genAlignmentFault()
+{
+ return new AlphaAlignmentFault;
+}
+
class ResetFault : public AlphaFault
{
private:
FaultStat & stat() {return _stat;}
};
-//Fault * ListOfFaults[];
-//int NumFaults;
+} // AlphaISA namespace
#endif // __FAULTS_HH__