typedef const char * FaultName;
typedef Stats::Scalar FaultStat;
-// Each class has it's name statically define in _name,
-// and has a virtual function to access it's name.
-// The function is necessary because otherwise, all objects
-// which are being accessed cast as a FaultBase * (namely
-// all faults returned using the Fault type) will use the
-// generic FaultBase name.
-
class FaultBase
{
public:
: panicStr(_str)
{ }
- FaultName name() const {return "Unimplemented simulator feature";}
+ FaultName name() const { return "Unimplemented simulator feature"; }
void invoke(ThreadContext * tc, const StaticInstPtr &inst =
StaticInst::nullStaticInstPtr);
};
class ReExec : public FaultBase
{
public:
- virtual FaultName name() const { return "Re-execution fault";}
+ virtual FaultName name() const { return "Re-execution fault"; }
ReExec() {}
void invoke(ThreadContext *tc, const StaticInstPtr &inst =
StaticInst::nullStaticInstPtr);
private:
Addr vaddr;
public:
- FaultName name() const {return "Generic page table fault";}
+ FaultName name() const { return "Generic page table fault"; }
GenericPageTableFault(Addr va) : vaddr(va) {}
void invoke(ThreadContext * tc, const StaticInstPtr &inst =
StaticInst::nullStaticInstPtr);
private:
Addr vaddr;
public:
- FaultName name() const {return "Generic alignment fault";}
+ FaultName name() const { return "Generic alignment fault"; }
GenericAlignmentFault(Addr va) : vaddr(va) {}
void invoke(ThreadContext * tc, const StaticInstPtr &inst =
StaticInst::nullStaticInstPtr);