diff options
Diffstat (limited to 'src/cpu/simple')
-rw-r--r-- | src/cpu/simple/atomic.cc | 13 | ||||
-rw-r--r-- | src/cpu/simple/base.cc | 4 | ||||
-rw-r--r-- | src/cpu/simple/base.hh | 8 |
3 files changed, 13 insertions, 12 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 6904ed936..072867536 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -421,17 +421,8 @@ AtomicSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res) if (req->isSwap()) { assert(res); *res = pkt->get<T>(); - } - - if (req->isLocked()) { - uint64_t scResult = req->getExtraData(); - if (scResult != 0) { - // clear failure counter - thread->setStCondFailures(0); - } - if (res) { - *res = req->getExtraData(); - } + } else if (res) { + *res = req->getScResult(); } } diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc index b8d1f3bed..80b137909 100644 --- a/src/cpu/simple/base.cc +++ b/src/cpu/simple/base.cc @@ -427,7 +427,9 @@ BaseSimpleCPU::postExecute() traceFunctions(thread->readPC()); if (traceData) { - traceData->finalize(); + traceData->dump(); + delete traceData; + traceData = NULL; } } diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh index b7d93c702..01c8e8eb7 100644 --- a/src/cpu/simple/base.hh +++ b/src/cpu/simple/base.hh @@ -329,6 +329,14 @@ class BaseSimpleCPU : public BaseCPU return thread->setMiscRegWithEffect(reg_idx, val); } + unsigned readStCondFailures() { + return thread->readStCondFailures(); + } + + void setStCondFailures(unsigned sc_failures) { + thread->setStCondFailures(sc_failures); + } + #if FULL_SYSTEM Fault hwrei() { return thread->hwrei(); } void ev5_trap(Fault fault) { fault->invoke(tc); } |