namespace AlphaISA
{
-FaultVect AlphaMachineCheckFault::_vect = 0x0401;
-FaultStat AlphaMachineCheckFault::_stat;
+FaultName MachineCheckFault::_name = "mchk";
+FaultVect MachineCheckFault::_vect = 0x0401;
+FaultStat MachineCheckFault::_stat;
-FaultVect AlphaAlignmentFault::_vect = 0x0301;
-FaultStat AlphaAlignmentFault::_stat;
+FaultName AlignmentFault::_name = "unalign";
+FaultVect AlignmentFault::_vect = 0x0301;
+FaultStat AlignmentFault::_stat;
FaultName ResetFault::_name = "reset";
FaultVect ResetFault::_vect = 0x0001;
virtual FaultVect vect() = 0;
};
-class AlphaMachineCheckFault :
- public MachineCheckFault,
- public AlphaFault
+class MachineCheckFault : public AlphaFault
{
private:
+ static FaultName _name;
static FaultVect _vect;
static FaultStat _stat;
public:
+ FaultName name() {return _name;}
FaultVect vect() {return _vect;}
FaultStat & stat() {return _stat;}
+ bool isMachineCheckFault() {return true;}
};
-class AlphaAlignmentFault :
- public AlignmentFault,
- public AlphaFault
+class AlignmentFault : public AlphaFault
{
private:
+ static FaultName _name;
static FaultVect _vect;
static FaultStat _stat;
public:
+ FaultName name() {return _name;}
FaultVect vect() {return _vect;}
FaultStat & stat() {return _stat;}
+ bool isAlignmentFault() {return true;}
};
static inline Fault genMachineCheckFault()
{
- return new AlphaMachineCheckFault;
+ return new MachineCheckFault;
}
static inline Fault genAlignmentFault()
{
- return new AlphaAlignmentFault;
+ return new AlignmentFault;
}
class ResetFault : public AlphaFault
FaultName name() {return _name;}
FaultVect vect() {return _vect;}
FaultStat & stat() {return _stat;}
+#if FULL_SYSTEM
void invoke(ExecContext * xc);
+#endif
};
class InterruptFault : public AlphaFault
#include "sim/faults.hh"
#include "cpu/exec_context.hh"
-FaultName MachineCheckFault::_name = "mchk";
-FaultName AlignmentFault::_name = "unalign";
-
#if !FULL_SYSTEM
void FaultBase::invoke(ExecContext * xc)
{
FaultBase * const NoFault = 0;
-//The ISAs are each responsible for providing a genMachineCheckFault and a
-//genAlignmentFault functions, which return faults to use in the case of a
-//machine check fault or an alignment fault, respectively. Base classes which
-//provide the name() function, and the isMachineCheckFault and isAlignmentFault
-//functions are provided below.
-
-class MachineCheckFault : public virtual FaultBase
-{
- private:
- static FaultName _name;
- public:
- FaultName name() {return _name;}
- bool isMachineCheckFault() {return true;}
-};
-
-class AlignmentFault : public virtual FaultBase
-{
- private:
- static FaultName _name;
- public:
- FaultName name() {return _name;}
- bool isAlignmentFault() {return true;}
-};
-
-
#endif // __FAULTS_HH__