Move store conditional result checking from SimpleAtomicCpu write
function into Alpha ISA description. write now just generically returns a result value if the res pointer is non-null (which means we can only provide a res pointer if we expect a valid result value). --HG-- extra : convert_revision : fb1c315515787f5fbbf7d1af7e428bdbfe8148b8
This commit is contained in:
@@ -401,15 +401,8 @@ AtomicSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (req->isLocked()) {
|
||||
uint64_t scResult = req->getScResult();
|
||||
if (scResult != 0) {
|
||||
// clear failure counter
|
||||
thread->setStCondFailures(0);
|
||||
}
|
||||
if (res) {
|
||||
*res = req->getScResult();
|
||||
}
|
||||
if (res) {
|
||||
*res = req->getScResult();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user