From: Ali Saidi Date: Mon, 12 Feb 2007 18:22:36 +0000 (-0500) Subject: Merge zizzer:/bk/newmem X-Git-Tag: m5_2.0_beta3~203 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9005f35621c564fb70b60223352732eb9cde955;p=gem5.git Merge zizzer:/bk/newmem into zeep.pool:/z/saidi/work/m5.newmem src/cpu/simple/atomic.cc: merge steve's changes in. --HG-- extra : convert_revision : a17eda37cd63c9380af6fe68b0aef4b1e1974231 --- b9005f35621c564fb70b60223352732eb9cde955 diff --cc src/cpu/simple/atomic.cc index 6a536fbcd,6904ed936..072867536 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@@ -401,8 -418,20 +418,11 @@@ AtomicSimpleCPU::write(T data, Addr add #endif } - if (res) { + if (req->isSwap()) { + assert(res); + *res = pkt->get(); - } - - 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(); } }