BaseDynInst: Preserve the faults returned from read and write.
authorTimothy M. Jones <tjones1@inf.ed.ac.uk>
Sat, 20 Feb 2010 20:11:58 +0000 (20:11 +0000)
committerTimothy M. Jones <tjones1@inf.ed.ac.uk>
Sat, 20 Feb 2010 20:11:58 +0000 (20:11 +0000)
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.

src/cpu/base_dyn_inst.hh

index 65578379b852981ed71839d14b8843eb6654a62d..a9ba1295840525e795d15a088a04ab37d21a40f2 100644 (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;