summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-04-24 16:59:50 -0400
committerKevin Lim <ktlim@umich.edu>2006-04-24 16:59:50 -0400
commitb14bf0321947419603610f07ed4f14b51a2192a3 (patch)
tree45fa28b476126fba7788ba01a4ce04057447f1a5
parentb363a3703da7f9773f4afe2469c0206e14de1813 (diff)
downloadgem5-b14bf0321947419603610f07ed4f14b51a2192a3.tar.xz
Fixes for ll/sc for the O3 model.
cpu/o3/alpha_cpu.hh: Store conditionals should not write their data to memory if they failed. cpu/o3/lsq_unit.hh: Setup request parameters when they're needed. --HG-- extra : convert_revision : d75cd7deda03584b7e25cb567e4d79032cac7118
-rw-r--r--cpu/o3/alpha_cpu.hh3
-rw-r--r--cpu/o3/lsq_unit.hh6
2 files changed, 5 insertions, 4 deletions
diff --git a/cpu/o3/alpha_cpu.hh b/cpu/o3/alpha_cpu.hh
index 68e149e77..dfdf092ed 100644
--- a/cpu/o3/alpha_cpu.hh
+++ b/cpu/o3/alpha_cpu.hh
@@ -425,9 +425,10 @@ class AlphaFullCPU : public FullO3CPU<Impl>
req->result = 2;
} else {
if (this->lockFlag/* && this->lockAddr == req->paddr*/) {
- req->result=1;
+ req->result = 1;
} else {
req->result = 0;
+ return NoFault;
}
}
}
diff --git a/cpu/o3/lsq_unit.hh b/cpu/o3/lsq_unit.hh
index 73c485ce9..ba8b1d2e2 100644
--- a/cpu/o3/lsq_unit.hh
+++ b/cpu/o3/lsq_unit.hh
@@ -566,6 +566,9 @@ LSQUnit<Impl>::read(MemReqPtr &req, T &data, int load_idx)
DPRINTF(LSQUnit, "Doing functional access for inst PC %#x\n",
loadQueue[load_idx]->readPC());
assert(!req->data);
+ req->cmd = Read;
+ req->completionEvent = NULL;
+ req->time = curTick;
req->data = new uint8_t[64];
Fault fault = cpu->read(req, data);
memcpy(req->data, &data, sizeof(T));
@@ -587,9 +590,6 @@ LSQUnit<Impl>::read(MemReqPtr &req, T &data, int load_idx)
}
DPRINTF(LSQUnit, "Doing timing access for inst PC %#x\n",
loadQueue[load_idx]->readPC());
- req->cmd = Read;
- req->completionEvent = NULL;
- req->time = curTick;
assert(!req->completionEvent);
req->completionEvent =