summaryrefslogtreecommitdiff
path: root/arch/alpha/faults.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-03-01 05:26:08 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-03-01 05:26:08 -0500
commit2eff368dd03c93a503e13ab82cf4c4abb0c06aa9 (patch)
treeb00065517fbbe2d95b913c2ff3d8f160e69ffc9e /arch/alpha/faults.hh
parent1cfc27742448ab0e364d2f7ffc7460d90714a6d2 (diff)
downloadgem5-2eff368dd03c93a503e13ab82cf4c4abb0c06aa9.tar.xz
Cleaned up some of the Fault system.
arch/alpha/ev5.cc: Commented out the intr_post function since it's not used. If this really -is- needed, it should be moved into the fault class. arch/alpha/faults.cc: arch/alpha/faults.hh: Moved the fault invocation code into the fault class fully, and got rid of the need for isA. cpu/exec_context.cc: cpu/exec_context.hh: Removed the trap function from the ExecContext. The faults will execute normally in full system mode, but always panic in syscall emulation mode. cpu/ozone/cpu.hh: cpu/simple/cpu.hh: Changed the execution context executing a fault to a fault executing on the execution context. sim/faults.cc: If not in full system mode, trying to invoke a fault causes a panic. sim/faults.hh: Removed the isA function. --HG-- extra : convert_revision : 894dc8f0755c8efc4b7ef5a09fb2cf7373042395
Diffstat (limited to 'arch/alpha/faults.hh')
-rw-r--r--arch/alpha/faults.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/alpha/faults.hh b/arch/alpha/faults.hh
index c0316288c..b9573905a 100644
--- a/arch/alpha/faults.hh
+++ b/arch/alpha/faults.hh
@@ -40,6 +40,9 @@ typedef const Addr FaultVect;
class AlphaFault : public virtual FaultBase
{
+ protected:
+ virtual bool skipFaultingInstruction() {return false;}
+ virtual bool setRestartAddress() {return true;}
public:
#if FULL_SYSTEM
void invoke(ExecContext * xc);
@@ -95,6 +98,8 @@ class ResetFault : public AlphaFault
class ArithmeticFault : public AlphaFault
{
+ protected:
+ bool skipFaultingInstruction() {return true;}
private:
static FaultName _name;
static FaultVect _vect;
@@ -103,10 +108,13 @@ class ArithmeticFault : public AlphaFault
FaultName name() {return _name;}
FaultVect vect() {return _vect;}
FaultStat & stat() {return _stat;}
+ void invoke(ExecContext * xc);
};
class InterruptFault : public AlphaFault
{
+ protected:
+ bool setRestartAddress() {return false;}
private:
static FaultName _name;
static FaultVect _vect;
@@ -227,6 +235,8 @@ class FloatEnableFault : public AlphaFault
class PalFault : public AlphaFault
{
+ protected:
+ bool skipFaultingInstruction() {return true;}
private:
static FaultName _name;
static FaultVect _vect;