// Set the OLC (it might previously have been zero)
ic.add(new Set(dock, false, Predicate.IgnoreFlagD, SetDest.OuterLoopCounter, count==0 ? 1 : count));
+ if (count!=1) {
+ ic.add(new Instruction.Head(dock));
+ }
for(Instruction i : instructions) {
if (i instanceof Move && (((Move)i).tokenIn || ((Move)i).dataIn))
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)
loopSize++;
}
}
+ if (count!=1) {
+ ic.add(new Instruction.Abort(dock, Predicate.FlagD));
+ }
if (autoflush && !"Debug".equals(dock.getShip().getType()) && next==null) {
if (dock.isInputDock())
ic.add(new Instruction.Flush(dock, true, Predicate.FlagD));