changeset 58d5d471b598 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=58d5d471b598
description:
        cpu: Fix barrier push to store buffer when full bug in Minor

        This patch fixes a bug where a completing load or store which is also a
        barrier can push a barrier into the store buffer without first checking
        that there is a free slot.

        The bug was not fatal but would print a warning that the store buffer
        was full when inserting.

diffstat:

 src/cpu/minor/lsq.cc |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 94d58056729f -r 58d5d471b598 src/cpu/minor/lsq.cc
--- a/src/cpu/minor/lsq.cc      Tue Oct 21 17:04:41 2014 -0500
+++ b/src/cpu/minor/lsq.cc      Wed Oct 29 23:18:24 2014 -0500
@@ -1370,9 +1370,13 @@
         /* Same instruction and complete access or a store that's
          *  capable of being moved to the store buffer */
         if (request->inst->id == inst->id) {
-            if (request->isComplete() ||
-                (request->state == LSQRequest::StoreToStoreBuffer &&
-                storeBuffer.canInsert()))
+            bool complete = request->isComplete();
+            bool can_store = storeBuffer.canInsert();
+            bool to_store_buffer = request->state ==
+                LSQRequest::StoreToStoreBuffer;
+
+            if ((complete && !(request->isBarrier() && !can_store)) ||
+                (to_store_buffer && can_store))
             {
                 ret = request;
             }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to