Fixed displayed microinstruction bit order
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 16 Sep 2019 11:32:53 +0000 (13:32 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 16 Sep 2019 11:32:53 +0000 (13:32 +0200)
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java

index 3af070f..151e01b 100644 (file)
@@ -138,13 +138,13 @@ public class InstructionView extends ViewPart implements ContextObserver
                columns[0] = col;
                col.setLabelProvider(new AddressLabelProvider());
 
-               int bit = 0;
+               int bit = miDef.sizeInBits();
                ParameterClassification[] classes = miDef.getParameterClassifications();
 
                for (int i = 0; i < size; i++)
                {
-                       int startBit = bit;
-                       int endBit = (bit = bit + classes[i].getExpectedBits()) - 1;
+                       int startBit = bit - 1;
+                       int endBit = bit = bit - classes[i].getExpectedBits();
                        String name = startBit == endBit ? Integer.toString(startBit) : startBit + "..." + endBit;
                        int bounds = 20 + 20 * classes[i].getExpectedBits();