diff options
Diffstat (limited to 'src/cpu/simple/atomic.cc')
-rw-r--r-- | src/cpu/simple/atomic.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 8a05d800e..234803be5 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -618,13 +618,17 @@ AtomicSimpleCPU::tick() preExecute(); - if(curStaticInst) - { + if (curStaticInst) { fault = curStaticInst->execute(this, traceData); // keep an instruction count if (fault == NoFault) countInst(); + else if (traceData) { + // If there was a fault, we should trace this instruction. + delete traceData; + traceData = NULL; + } postExecute(); } |