diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-04-06 18:04:49 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-04-06 18:04:49 -0400 |
commit | 61b2bd9d28fa288628d8ef3eb3fd4ab3cef9902f (patch) | |
tree | fca3484ae5eca56d5363290db28a84e98082b972 /arch/mips | |
parent | 6240f8c4bcf12e3367905adfba066bb14f79262a (diff) | |
download | gem5-61b2bd9d28fa288628d8ef3eb3fd4ab3cef9902f.tar.xz |
added unimp faults
update for newmem
arch/mips/faults.cc:
arch/mips/faults.hh:
arch/sparc/faults.cc:
arch/sparc/faults.hh:
added unimp faults for mips
arch/mips/isa/base.isa:
arch/mips/isa/includes.isa:
thou shalt not put includes inside a namespace
dev/alpha_console.cc:
fix formatting
dev/io_device.hh:
add comments
dev/tsunami_cchip.cc:
dev/tsunami_cchip.hh:
update for newmem
sim/process.cc:
fix seemingly wronge code.
--HG--
extra : convert_revision : 9dcfe188d00d525b935d8ef4fa323280bbfa9a0e
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/faults.cc | 10 | ||||
-rw-r--r-- | arch/mips/faults.hh | 20 | ||||
-rw-r--r-- | arch/mips/isa/base.isa | 2 | ||||
-rw-r--r-- | arch/mips/isa/includes.isa | 3 |
4 files changed, 33 insertions, 2 deletions
diff --git a/arch/mips/faults.cc b/arch/mips/faults.cc index 1b31dfa69..a31856f07 100644 --- a/arch/mips/faults.cc +++ b/arch/mips/faults.cc @@ -98,6 +98,10 @@ FaultName IntegerOverflowFault::_name = "intover"; FaultVect IntegerOverflowFault::_vect = 0x0501; FaultStat IntegerOverflowFault::_count; +FaultName UnimpFault::_name = "Unimplemented Simulator feature"; +FaultVect UnimpFault::_vect = 0x0001; +FaultStat UnimpFault::_count; + #if FULL_SYSTEM void MipsFault::invoke(ExecContext * xc) @@ -125,6 +129,12 @@ void ArithmeticFault::invoke(ExecContext * xc) panic("Arithmetic traps are unimplemented!"); } +void UnimpFault::invoke(ExecContext * xc) +{ + FaultBase::invoke(xc); + panic("Unimpfault: %s\n", panicStr.c_str()); +} + #endif } // namespace MipsISA diff --git a/arch/mips/faults.hh b/arch/mips/faults.hh index 0bdabe29e..b0d228090 100644 --- a/arch/mips/faults.hh +++ b/arch/mips/faults.hh @@ -264,6 +264,26 @@ class IntegerOverflowFault : public MipsFault FaultStat & countStat() {return _count;} }; +class UnimpFault : public MipsFault +{ + private: + std::string panicStr; + static FaultName _name; + static FaultVect _vect; + static FaultStat _count; + public: + UnimpFault(std::string _str) + : panicStr(_str) + { } + + FaultName name() {return _name;} + FaultVect vect() {return _vect;} + FaultStat & countStat() {return _count;} +#if FULL_SYSTEM + void invoke(ExecContext * xc); +#endif +}; + } // MipsISA namespace #endif // __FAULTS_HH__ diff --git a/arch/mips/isa/base.isa b/arch/mips/isa/base.isa index 139a6d876..9ed9651d2 100644 --- a/arch/mips/isa/base.isa +++ b/arch/mips/isa/base.isa @@ -9,8 +9,6 @@ output header {{ #define R31 31 -#include "arch/mips/faults.hh" -#include "arch/mips/isa_traits.hh" using namespace MipsISA; diff --git a/arch/mips/isa/includes.isa b/arch/mips/isa/includes.isa index b81c4eda2..9c370fbe3 100644 --- a/arch/mips/isa/includes.isa +++ b/arch/mips/isa/includes.isa @@ -17,6 +17,8 @@ output decoder {{ #include "base/cprintf.hh" #include "base/loader/symtab.hh" #include "cpu/exec_context.hh" // for Jump::branchTarget() +#include "arch/mips/faults.hh" +#include "arch/mips/isa_traits.hh" #include <math.h> #if defined(linux) @@ -27,6 +29,7 @@ using namespace MipsISA; }}; output exec {{ +#include "arch/mips/faults.hh" #include "arch/mips/isa_traits.hh" #include <math.h> #if defined(linux) |