diff options
Diffstat (limited to 'arch/sparc/faults.hh')
-rw-r--r-- | arch/sparc/faults.hh | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/arch/sparc/faults.hh b/arch/sparc/faults.hh index 985407c26..87de8daaa 100644 --- a/arch/sparc/faults.hh +++ b/arch/sparc/faults.hh @@ -468,31 +468,30 @@ class AsyncDataError : public SparcFault FaultStat & countStat() {return _count;} }; -class EnumeratedFault : public SparcFault -{ - protected: - uint32_t _n; - virtual TrapType baseTrapType() = 0; - public: - EnumeratedFault(uint32_t n) : SparcFault() {_n = n;} - TrapType trapType() {return baseTrapType() + _n;} -}; - -class CleanWindow : public EnumeratedFault +class CleanWindow : public SparcFault { private: static FaultName _name; - static TrapType _baseTrapType; + static TrapType _trapType; static FaultPriority _priority; static FaultStat _count; - TrapType baseTrapType() {return _baseTrapType;} public: - CleanWindow(uint32_t n) : EnumeratedFault(n) {;} FaultName name() {return _name;} + TrapType trapType() {return _trapType;} FaultPriority priority() {return _priority;} FaultStat & countStat() {return _count;} }; +class EnumeratedFault : public SparcFault +{ + protected: + uint32_t _n; + virtual TrapType baseTrapType() = 0; + public: + EnumeratedFault(uint32_t n) : SparcFault() {_n = n;} + TrapType trapType() {return baseTrapType() + _n;} +}; + class InterruptLevelN : public EnumeratedFault { private: @@ -582,6 +581,29 @@ class TrapInstruction : public EnumeratedFault FaultStat & countStat() {return _count;} }; +class UnimpFault : public SparcFault +{ + private: + static FaultName _name; + static TrapType _trapType; + static FaultPriority _priority; + static FaultStat _count; + std::string panicStr; + public: + UnimpFault(std::string _str) + : panicStr(_str) + { } + + FaultName name() {return _name;} + TrapType trapType() {return _trapType;} + FaultPriority priority() {return _priority;} + FaultStat & countStat() {return _count;} +#if FULL_SYSTEM + void invoke(ExecContext * xc); +#endif +}; + + } // SparcISA namespace #endif // __FAULTS_HH__ |