Exemplo n.º 1
0
        private void AddBits0To8(CIRegisterVisualization aVisualization, bool aIsIABitReserved)
        {
            uint value = aVisualization.Register.Value;

            // Processor mode
            CIRegisterVisBitRange rangeProcMode = new CIRegisterVisBitRange(Container, 0, 4, "Processor Mode");

            rangeProcMode.Interpretation = ArmRegisterBankUtils.BankAsStringLong(ProcessorMode);
            rangeProcMode.ExtractBits(value, "########", "########", "########", "###11111");
            aVisualization.AddChild(rangeProcMode);

            // Thumb bit
            CIRegisterVisBit thumbBit = CreateYesNoBit(aVisualization, 5, "########", "########", "########", "##1#####", false, "Thumb Mode", "T");

            aVisualization.AddChild(thumbBit);

            // FIQ, IRQ bits
            CIRegisterVisBitGroup gpIRQs = new CIRegisterVisBitGroup(Container, "Interrupt Disabled Bits");
            CIRegisterVisBit      fiqBit = CreateYesNoBit(aVisualization, 6, "########", "########", "########", "#1######", false, "FIQ Disabled", "F");

            gpIRQs.Add(fiqBit);
            CIRegisterVisBit irqBit = CreateYesNoBit(aVisualization, 7, "########", "########", "########", "1#######", false, "IRQ Disabled", "I");

            gpIRQs.Add(irqBit);

            // Imprecise Abort bit - reserved in non-ARMv5
            CIRegisterVisBit iaBit = CreateYesNoBit(aVisualization, 8, "########", "########", "#######1", "########", aIsIABitReserved, "Imprecise Aborts", "A");

            gpIRQs.Add(iaBit);

            aVisualization.AddChild(gpIRQs);
        }
Exemplo n.º 2
0
        private void AddConditionCodeFlags(CIRegisterVisualization aVisualization)
        {
            uint value = aVisualization.Register.Value;

            CIRegisterVisBitGroup group = new CIRegisterVisBitGroup(Container);

            CIRegisterVisBit oBit = CreateYesNoBit(aVisualization, 28, "###1####", "########", "########", "########", false, "Overflow (Condition Code)", "O");

            group.Add(oBit);
            CIRegisterVisBit cBit = CreateYesNoBit(aVisualization, 29, "##1#####", "########", "########", "########", false, "Carry (Condition Code)", "C");

            group.Add(cBit);
            CIRegisterVisBit zBit = CreateYesNoBit(aVisualization, 30, "#1######", "########", "########", "########", false, "Zero (Condition Code)", "Z");

            group.Add(zBit);
            CIRegisterVisBit nBit = CreateYesNoBit(aVisualization, 31, "1#######", "########", "########", "########", false, "Negative (Condition Code)", "N");

            group.Add(nBit);

            aVisualization.AddChild(group);
        }