diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/ev5.cc | 1 | ||||
-rw-r--r-- | arch/alpha/faults.cc | 43 | ||||
-rw-r--r-- | arch/alpha/faults.hh | 121 |
3 files changed, 104 insertions, 61 deletions
diff --git a/arch/alpha/ev5.cc b/arch/alpha/ev5.cc index a48609729..72f48bfb2 100644 --- a/arch/alpha/ev5.cc +++ b/arch/alpha/ev5.cc @@ -91,7 +91,6 @@ AlphaISA::fault_addr(Fault * fault) if(fault == NoFault) return 0x0000; else if(fault == MachineCheckFault) return 0x0401; else if(fault == AlignmentFault) return 0x0301; - else if(fault == FakeMemFault) return 0x0000; //Deal with the alpha specific faults return ((AlphaFault*)fault)->vect; }; diff --git a/arch/alpha/faults.cc b/arch/alpha/faults.cc index 2dc3d9cbb..e05b3fe59 100644 --- a/arch/alpha/faults.cc +++ b/arch/alpha/faults.cc @@ -28,20 +28,34 @@ #include "arch/alpha/faults.hh" -ResetFaultType * ResetFault = new ResetFaultType("reset", 1, 0x0001); -ArithmeticFaultType * ArithmeticFault = new ArithmeticFaultType("arith", 3, 0x0501); -InterruptFaultType * InterruptFault = new InterruptFaultType("interrupt", 4, 0x0101); -NDtbMissFaultType * NDtbMissFault = new NDtbMissFaultType("dtb_miss_single", 5, 0x0201); -PDtbMissFaultType * PDtbMissFault = new PDtbMissFaultType("dtb_miss_double", 6, 0x0281); -DtbPageFaultType * DtbPageFault = new DtbPageFaultType("dfault", 8, 0x0381); -DtbAcvFaultType * DtbAcvFault = new DtbAcvFaultType("dfault", 9, 0x0381); -ItbMissFaultType * ItbMissFault = new ItbMissFaultType("itbmiss", 10, 0x0181); -ItbPageFaultType * ItbPageFault = new ItbPageFaultType("itbmiss", 11, 0x0181); -ItbAcvFaultType * ItbAcvFault = new ItbAcvFaultType("iaccvio", 12, 0x0081); -UnimplementedOpcodeFaultType * UnimplementedOpcodeFault = new UnimplementedOpcodeFaultType("opdec", 13, 0x0481); -FloatEnableFaultType * FloatEnableFault = new FloatEnableFaultType("fen", 14, 0x0581); -PalFaultType * PalFault = new PalFaultType("pal", 15, 0x2001); -IntegerOverflowFaultType * IntegerOverflowFault = new IntegerOverflowFaultType("intover", 16, 0x0501); +ResetFaultType * const ResetFault = + new ResetFaultType("reset", 1, 0x0001); +ArithmeticFaultType * const ArithmeticFault = + new ArithmeticFaultType("arith", 3, 0x0501); +InterruptFaultType * const InterruptFault = + new InterruptFaultType("interrupt", 4, 0x0101); +NDtbMissFaultType * const NDtbMissFault = + new NDtbMissFaultType("dtb_miss_single", 5, 0x0201); +PDtbMissFaultType * const PDtbMissFault = + new PDtbMissFaultType("dtb_miss_double", 6, 0x0281); +DtbPageFaultType * const DtbPageFault = + new DtbPageFaultType("dfault", 8, 0x0381); +DtbAcvFaultType * const DtbAcvFault = + new DtbAcvFaultType("dfault", 9, 0x0381); +ItbMissFaultType * const ItbMissFault = + new ItbMissFaultType("itbmiss", 10, 0x0181); +ItbPageFaultType * const ItbPageFault = + new ItbPageFaultType("itbmiss", 11, 0x0181); +ItbAcvFaultType * const ItbAcvFault = + new ItbAcvFaultType("iaccvio", 12, 0x0081); +UnimplementedOpcodeFaultType * const UnimplementedOpcodeFault = + new UnimplementedOpcodeFaultType("opdec", 13, 0x0481); +FloatEnableFaultType * const FloatEnableFault = + new FloatEnableFaultType("fen", 14, 0x0581); +PalFaultType * const PalFault = + new PalFaultType("pal", 15, 0x2001); +IntegerOverflowFaultType * const IntegerOverflowFault = + new IntegerOverflowFaultType("intover", 16, 0x0501); Fault ** ListOfFaults[] = { (Fault **)&NoFault, @@ -61,7 +75,6 @@ Fault ** ListOfFaults[] = { (Fault **)&FloatEnableFault, (Fault **)&PalFault, (Fault **)&IntegerOverflowFault, - (Fault **)&FakeMemFault }; int NumFaults = sizeof(ListOfFaults) / sizeof(Fault **); diff --git a/arch/alpha/faults.hh b/arch/alpha/faults.hh index 2bb929a1e..06605861a 100644 --- a/arch/alpha/faults.hh +++ b/arch/alpha/faults.hh @@ -34,94 +34,125 @@ class AlphaFault : public Fault { -public: - AlphaFault(char * newName, int newId, Addr newVect) : Fault(newName, newId), vect(newVect) {;} - TheISA::Addr vect; + public: + AlphaFault(char * newName, int newId, Addr newVect) + : Fault(newName, newId), vect(newVect) + {;} + + TheISA::Addr vect; }; extern class ResetFaultType : public AlphaFault { -public: - ResetFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * ResetFault; + public: + ResetFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const ResetFault; extern class ArithmeticFaultType : public AlphaFault { -public: - ArithmeticFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * ArithmeticFault; + public: + ArithmeticFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const ArithmeticFault; extern class InterruptFaultType : public AlphaFault { -public: - InterruptFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * InterruptFault; + public: + InterruptFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const InterruptFault; extern class NDtbMissFaultType : public AlphaFault { -public: - NDtbMissFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * NDtbMissFault; + public: + NDtbMissFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const NDtbMissFault; extern class PDtbMissFaultType : public AlphaFault { -public: - PDtbMissFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * PDtbMissFault; + public: + PDtbMissFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const PDtbMissFault; extern class DtbPageFaultType : public AlphaFault { -public: - DtbPageFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * DtbPageFault; + public: + DtbPageFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const DtbPageFault; extern class DtbAcvFaultType : public AlphaFault { -public: - DtbAcvFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * DtbAcvFault; + public: + DtbAcvFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const DtbAcvFault; extern class ItbMissFaultType : public AlphaFault { -public: - ItbMissFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * ItbMissFault; + public: + ItbMissFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const ItbMissFault; extern class ItbPageFaultType : public AlphaFault { -public: - ItbPageFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * ItbPageFault; + public: + ItbPageFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const ItbPageFault; extern class ItbAcvFaultType : public AlphaFault { -public: - ItbAcvFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * ItbAcvFault; + public: + ItbAcvFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const ItbAcvFault; extern class UnimplementedOpcodeFaultType : public AlphaFault { -public: - UnimplementedOpcodeFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * UnimplementedOpcodeFault; + public: + UnimplementedOpcodeFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const UnimplementedOpcodeFault; extern class FloatEnableFaultType : public AlphaFault { -public: - FloatEnableFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * FloatEnableFault; + public: + FloatEnableFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const FloatEnableFault; extern class PalFaultType : public AlphaFault { -public: - PalFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * PalFault; + public: + PalFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const PalFault; extern class IntegerOverflowFaultType : public AlphaFault { -public: - IntegerOverflowFaultType(char * newName, int newId, Addr newVect) : AlphaFault(newName, newId, newVect) {;} -} * IntegerOverflowFault; + public: + IntegerOverflowFaultType(char * newName, int newId, Addr newVect) + : AlphaFault(newName, newId, newVect) + {;} +} * const IntegerOverflowFault; extern Fault ** ListOfFaults[]; extern int NumFaults; |