changeset 402b0e25c41b in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=402b0e25c41b
description:
        cpu: Fix setTranslateLatency() bug for squashed instructions

        setTranslateLatency could sometimes improperly access a deleted request
        packet after an instruction was squashed.

diffstat:

 src/cpu/translation.hh |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 266db8ff9ae8 -r 402b0e25c41b src/cpu/translation.hh
--- a/src/cpu/translation.hh    Wed Apr 23 05:18:25 2014 -0400
+++ b/src/cpu/translation.hh    Wed Apr 23 05:18:26 2014 -0400
@@ -255,8 +255,11 @@
         assert(state);
         assert(mode == state->mode);
         if (state->finish(fault, index)) {
+            if (state->getFault() == NoFault) {
+                // Don't access the request if faulted (due to squash)
+                req->setTranslateLatency();
+            }
             xc->finishTranslation(state);
-            req->setTranslateLatency();
         }
         delete this;
     }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to