}
/** sets the data latch to a literal value */
+ public void literal(BitVector literal) {
+ // FIXME: code duplication here
+ // FIXME: be more intelligent here to avoid shifts if possible?
+ int counter = 0;
+ while(counter < dock.getShip().getFleet().getWordWidth()) counter += fleet.getShiftWidth();
+ while(counter > 0) {
+ BitVector temp = new BitVector(dock.getShip().getFleet().getShiftWidth());
+ for(int i=counter-1; i>=counter-fleet.getShiftWidth(); i--)
+ if (i<literal.length())
+ temp.set(i-(counter-fleet.getShiftWidth()), literal.get(i));
+ instructions.add(new Shift(dock, count!=1, predicate, temp));
+ counter -= fleet.getShiftWidth();
+ }
+ }
+
+ /** sets the data latch to a literal value */
public void literal(long literal) {
flush_pending();
if (((FleetTwoFleet)fleet).isSmallEnoughToFit(literal)) {