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
This commit is contained in:
@@ -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()));
|
||||
|
||||
@@ -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[] = {
|
||||
|
||||
@@ -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;}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user