summaryrefslogtreecommitdiff
path: root/arch/alpha
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-02-27 23:26:13 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-02-27 23:26:13 -0500
commit6165419d356fb0cdbcb70d22dcd2f32e689eb7db (patch)
tree61dc14eca57e4be6dbfd53d68ae5e2e1ad2343ec /arch/alpha
parent36b2d9815e32781aba1f51acb0b89cdd4f3e2da9 (diff)
downloadgem5-6165419d356fb0cdbcb70d22dcd2f32e689eb7db.tar.xz
Changed ev5_trap from a function of the execution context to a function of the fault. The actual function still resides in the execution context.
--HG-- extra : convert_revision : 56e33536cdd9079ace03896b85ea3c84b6eb4e57
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/ev5.cc2
-rw-r--r--arch/alpha/faults.cc20
-rw-r--r--arch/alpha/faults.hh9
3 files changed, 30 insertions, 1 deletions
diff --git a/arch/alpha/ev5.cc b/arch/alpha/ev5.cc
index 349c2930f..23546bbe2 100644
--- a/arch/alpha/ev5.cc
+++ b/arch/alpha/ev5.cc
@@ -166,7 +166,7 @@ AlphaISA::zeroRegisters(CPU *cpu)
}
void
-ExecContext::ev5_trap(Fault fault)
+ExecContext::ev5_temp_trap(Fault fault)
{
DPRINTF(Fault, "Fault %s at PC: %#x\n", fault->name(), regs.pc);
cpu->recordEvent(csprintf("Fault %s", fault->name()));
diff --git a/arch/alpha/faults.cc b/arch/alpha/faults.cc
index 99365f8d2..2eedfedbd 100644
--- a/arch/alpha/faults.cc
+++ b/arch/alpha/faults.cc
@@ -27,6 +27,7 @@
*/
#include "arch/alpha/faults.hh"
+#include "cpu/exec_context.hh"
namespace AlphaISA
{
@@ -97,6 +98,25 @@ FaultName IntegerOverflowFault::_name = "intover";
FaultVect IntegerOverflowFault::_vect = 0x0501;
FaultStat IntegerOverflowFault::_stat;
+#if FULL_SYSTEM
+
+void AlphaFault::ev5_trap(ExecContext * xc)
+{
+ xc->ev5_temp_trap(this);
+}
+
+void AlphaMachineCheckFault::ev5_trap(ExecContext * xc)
+{
+ xc->ev5_temp_trap(this);
+}
+
+void AlphaAlignmentFault::ev5_trap(ExecContext * xc)
+{
+ xc->ev5_temp_trap(this);
+}
+
+#endif
+
} // namespace AlphaISA
/*Fault * ListOfFaults[] = {
diff --git a/arch/alpha/faults.hh b/arch/alpha/faults.hh
index f8cb44017..7c52738c1 100644
--- a/arch/alpha/faults.hh
+++ b/arch/alpha/faults.hh
@@ -45,6 +45,9 @@ class AlphaFault : public FaultBase
static FaultVect _vect;
static FaultStat _stat;
public:
+#if FULL_SYSTEM
+ void ev5_trap(ExecContext * xc);
+#endif
FaultName name() {return _name;}
virtual FaultVect vect() {return _vect;}
virtual FaultStat & stat() {return _stat;}
@@ -56,6 +59,9 @@ class AlphaMachineCheckFault : public MachineCheckFault
static FaultVect _vect;
static FaultStat _stat;
public:
+#if FULL_SYSTEM
+ void ev5_trap(ExecContext * xc);
+#endif
FaultVect vect() {return _vect;}
FaultStat & stat() {return _stat;}
};
@@ -66,6 +72,9 @@ class AlphaAlignmentFault : public AlignmentFault
static FaultVect _vect;
static FaultStat _stat;
public:
+#if FULL_SYSTEM
+ void ev5_trap(ExecContext * xc);
+#endif
FaultVect vect() {return _vect;}
FaultStat & stat() {return _stat;}
};