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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
output header {{
|
||||
|
||||
#define R31 31
|
||||
#include "arch/mips/faults.hh"
|
||||
#include "arch/mips/isa_traits.hh"
|
||||
|
||||
using namespace MipsISA;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user