Faults: Pass the StaticInst involved, if any, to a Fault's invoke method.

Also move the "Fault" reference counted pointer type into a separate file,
sim/fault.hh. It would be better to name this less similarly to sim/faults.hh
to reduce confusion, but fault.hh matches the name of the type. We could change
Fault to FaultPtr to match other pointer types, and then changing the name of
the file would make more sense.
This commit is contained in:
Gabe Black
2010-09-13 19:26:03 -07:00
parent 2edfcbbaee
commit 6833ca7eed
66 changed files with 285 additions and 161 deletions

View File

@@ -1068,7 +1068,7 @@ DefaultCommit<Impl>::commitHead(DynInstPtr &head_inst, unsigned inst_num)
// needed to update the state as soon as possible. This
// prevents external agents from changing any specific state
// that the trap need.
cpu->trap(inst_fault, tid);
cpu->trap(inst_fault, tid, head_inst);
// Exit state update mode to avoid accidental updating.
thread[tid]->inSyscall = false;