summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-04-06 18:04:49 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-04-06 18:04:49 -0400
commit61b2bd9d28fa288628d8ef3eb3fd4ab3cef9902f (patch)
treefca3484ae5eca56d5363290db28a84e98082b972 /arch/sparc
parent6240f8c4bcf12e3367905adfba066bb14f79262a (diff)
downloadgem5-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/sparc')
-rw-r--r--arch/sparc/faults.cc11
-rw-r--r--arch/sparc/faults.hh23
2 files changed, 33 insertions, 1 deletions
diff --git a/arch/sparc/faults.cc b/arch/sparc/faults.cc
index 9831a7679..79ea7f54a 100644
--- a/arch/sparc/faults.cc
+++ b/arch/sparc/faults.cc
@@ -215,7 +215,10 @@ TrapType TrapInstruction::_baseTrapType = 0x100;
FaultPriority TrapInstruction::_priority = 16;
FaultStat TrapInstruction::_count;
-
+FaultName UnimpFault::_name = "Unimplemented Simulator feature";
+TrapType UnimpFault::_trapType = 0x000;
+FaultPriority UnimpFault::_priority = 0;
+FaultStat UnimpFault::_count;
#if FULL_SYSTEM
@@ -242,6 +245,12 @@ void SparcFault::invoke(ExecContext * xc)
xc->regs.npc = xc->regs.pc + sizeof(MachInst);*/
}
+void UnimpFault::invoke(ExecContext * xc)
+{
+ panic("Unimpfault: %s\n", panicStr.c_str());
+}
+
+
#endif
} // namespace SparcISA
diff --git a/arch/sparc/faults.hh b/arch/sparc/faults.hh
index 985407c26..62bffa72e 100644
--- a/arch/sparc/faults.hh
+++ b/arch/sparc/faults.hh
@@ -582,6 +582,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__