changeset e639ff917d2e in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=e639ff917d2e
description:
cpu: Fix case where o3 lsq could print out uninitialized data
In the O3 LSQ, data read/written is printed out in DPRINTFs. However,
the data field is treated as a character string with a null terminated.
However the data field is not encoded this way. This patch removes
that possibility by removing the data part of the print.
diffstat:
src/cpu/o3/lsq_unit.hh | 7 +++----
src/cpu/o3/lsq_unit_impl.hh | 4 ++--
2 files changed, 5 insertions(+), 6 deletions(-)
diffs (43 lines):
diff -r 73b035a42df1 -r e639ff917d2e src/cpu/o3/lsq_unit.hh
--- a/src/cpu/o3/lsq_unit.hh Tue Apr 01 14:24:36 2014 -0500
+++ b/src/cpu/o3/lsq_unit.hh Tue Apr 01 14:22:06 2014 -0500
@@ -711,8 +711,7 @@
storeQueue[store_idx].data + shift_amt, req->getSize());
DPRINTF(LSQUnit, "Forwarding from store idx %i to load to "
- "addr %#x, data %#x\n",
- store_idx, req->getVaddr(), data);
+ "addr %#x\n", store_idx, req->getVaddr());
PacketPtr data_pkt = new Packet(req, MemCmd::ReadReq);
data_pkt->dataStatic(load_inst->memData);
@@ -916,9 +915,9 @@
{
assert(storeQueue[store_idx].inst);
- DPRINTF(LSQUnit, "Doing write to store idx %i, addr %#x data %#x"
+ DPRINTF(LSQUnit, "Doing write to store idx %i, addr %#x"
" | storeHead:%i [sn:%i]\n",
- store_idx, req->getPaddr(), data, storeHead,
+ store_idx, req->getPaddr(), storeHead,
storeQueue[store_idx].inst->seqNum);
storeQueue[store_idx].req = req;
diff -r 73b035a42df1 -r e639ff917d2e src/cpu/o3/lsq_unit_impl.hh
--- a/src/cpu/o3/lsq_unit_impl.hh Tue Apr 01 14:24:36 2014 -0500
+++ b/src/cpu/o3/lsq_unit_impl.hh Tue Apr 01 14:22:06 2014 -0500
@@ -155,12 +155,12 @@
cpu = cpu_ptr;
iewStage = iew_ptr;
- DPRINTF(LSQUnit, "Creating LSQUnit%i object.\n",id);
-
lsq = lsq_ptr;
lsqID = id;
+ DPRINTF(LSQUnit, "Creating LSQUnit%i object.\n",id);
+
// Add 1 for the sentinel entry (they are circular queues).
LQEntries = maxLQEntries + 1;
SQEntries = maxSQEntries + 1;
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev