changeset acce52081b45 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=acce52081b45
description:
LSQ: Moved a couple of lines to enable O3 + Ruby
This patch makes O3 CPU work along with the Ruby memory model. Ruby
overwrites the senderState pointer with another pointer. The pointer
is restored only when Ruby gets done with the packet. LSQ makes use of
senderState just after sendTiming() returns. But the dynamic_cast
returns
a NULL pointer since Ruby's senderState pointer is from a different
class.
Storing the senderState pointer before calling sendTiming() does away
with
the problem.
diffstat:
src/cpu/o3/lsq_unit_impl.hh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (17 lines):
diff -r cf26f9578cd0 -r acce52081b45 src/cpu/o3/lsq_unit_impl.hh
--- a/src/cpu/o3/lsq_unit_impl.hh Mon Sep 26 02:09:04 2011 -0700
+++ b/src/cpu/o3/lsq_unit_impl.hh Mon Sep 26 12:18:32 2011 -0500
@@ -1191,10 +1191,10 @@
DPRINTF(LSQUnit, "Receiving retry: store blocked\n");
assert(retryPkt != NULL);
+ LSQSenderState *state =
+ dynamic_cast<LSQSenderState *>(retryPkt->senderState);
+
if (dcachePort->sendTiming(retryPkt)) {
- LSQSenderState *state =
- dynamic_cast<LSQSenderState *>(retryPkt->senderState);
-
// Don't finish the store unless this is the last packet.
if (!TheISA::HasUnalignedMemAcc || !state->pktToSend ||
state->pendingPacket == retryPkt) {
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev