BaseDynInst: Preserve the faults returned from read and write.

When implementing timing address translations instead of atomic, I
forgot to preserve the faults that are returned from the read and
write calls.  This patch reinstates them.
This commit is contained in:
Timothy M. Jones 2010-02-20 20:11:58 +00:00
parent 29e8bcead5
commit a5feaa6a69

View file

@ -887,7 +887,7 @@ BaseDynInst<Impl>::read(Addr addr, T &data, unsigned flags)
if (fault == NoFault) {
effAddr = req->getVaddr();
effAddrValid = true;
cpu->read(req, sreqLow, sreqHigh, data, lqIdx);
fault = cpu->read(req, sreqLow, sreqHigh, data, lqIdx);
} else {
// Return a fixed value to keep simulation deterministic even
@ -933,7 +933,7 @@ BaseDynInst<Impl>::write(T data, Addr addr, unsigned flags, uint64_t *res)
if (fault == NoFault) {
effAddr = req->getVaddr();
effAddrValid = true;
cpu->write(req, sreqLow, sreqHigh, data, sqIdx);
fault = cpu->write(req, sreqLow, sreqHigh, data, sqIdx);
}
return fault;