diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-03-01 19:03:42 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-03-01 19:03:42 -0500 |
commit | 6b7d62790399f3ff675e5d37a25c320aa068897a (patch) | |
tree | 5227a88b50bcecf37349f181b208bd39d3626b45 /arch/alpha | |
parent | b71f9c801eb869b477a1e5a6f12498862efbb886 (diff) | |
download | gem5-6b7d62790399f3ff675e5d37a25c320aa068897a.tar.xz |
Got rid of the multiple inheritance in the Fault classes, and the base MachineCheck and Alignment faults.
--HG--
extra : convert_revision : 4b1429ef5c7a11c25e28f2bc868cc1481a08c5d1
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/faults.cc | 10 | ||||
-rw-r--r-- | arch/alpha/faults.hh | 20 |
2 files changed, 18 insertions, 12 deletions
diff --git a/arch/alpha/faults.cc b/arch/alpha/faults.cc index 7cdcc9bab..0a836363c 100644 --- a/arch/alpha/faults.cc +++ b/arch/alpha/faults.cc @@ -35,11 +35,13 @@ 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; diff --git a/arch/alpha/faults.hh b/arch/alpha/faults.hh index b9573905a..c4a72e07c 100644 --- a/arch/alpha/faults.hh +++ b/arch/alpha/faults.hh @@ -50,38 +50,40 @@ class AlphaFault : public virtual FaultBase 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 @@ -108,7 +110,9 @@ class ArithmeticFault : 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 |