update to 03-Jan-2009 am33: head, abort, and d-flag
[fleet.git] / src / edu / berkeley / fleet / ir / Context.java
index 170c2a5..a196660 100644 (file)
@@ -350,7 +350,7 @@ public class Context {
             boolean blockingInstructionEncountered = false;
 
             // Set the OLC (it might previously have been zero)
-            ic.add(new Set(dock, false, Predicate.IgnoreOLC, SetDest.OuterLoopCounter, count==0 ? 1 : count));
+            ic.add(new Set(dock, false, Predicate.IgnoreFlagD, SetDest.OuterLoopCounter, count==0 ? 1 : count));
 
             for(Instruction i : instructions) {
                 if (i instanceof Move && (((Move)i).tokenIn || ((Move)i).dataIn))
@@ -366,6 +366,7 @@ public class Context {
                     numInstructionsNotIncludingNonblockingPrefix > dock.getInstructionFifoSize())
                     throw new RuntimeException("instruction sequence is too long for instruction fifo at " + dock);
             } else {
+                ic.add(new Instruction.Head(dock));
                 if (count != 0) {
                     ic.add(new Instruction.Set(dock, true, Predicate.Default, SetDest.OuterLoopCounter, SetSource.Decrement));
                     if (blockingInstructionEncountered)
@@ -375,7 +376,7 @@ public class Context {
             }
             if (autoflush && !"Debug".equals(dock.getShip().getType()) && next==null) {
                 if (dock.isInputDock())
-                    ic.add(new Instruction.Flush(dock, true, Predicate.OLCZero));
+                    ic.add(new Instruction.Flush(dock, true, Predicate.FlagD));
             }
             if (count!=1) {
                 ic.add(new Instruction.Tail(dock));