示例#1
0
 // version of addOp for Thumb instructions
 static protected void addOp(ArmInstructionTemplate at)
 {
     if (thumbNames == null)
     {
         thumbNames = new Dictionary <string, ArmInstructionTemplate>();
     }
     thumbNames[at.Name] = at;
 }
示例#2
0
        static protected int nextSlot = 0;  // next unused spot in reverseMap

        // version of addOp for regular ARM instructions
        static protected void addOp(ArmInstructionTemplate at, uint mask)
        {
            if (opcodeNames == null)
            {
                opcodeNames = new Dictionary <string, ArmInstructionTemplate>();
            }
            if (opcodeNames.ContainsKey(at.Name))
            {
                Console.WriteLine("duplicate insertion of {0} into opcodeNames table\n", at.Name);
                throw new Exception("Aargh!");
            }
            opcodeNames[at.Name] = at;
            if (mask != 0)    // don't put ADR, ADRL in the table
            {
                reverseMap[nextSlot].mask  = mask;
                reverseMap[nextSlot].value = at.code;
                reverseMap[nextSlot].op    = at;
                nextSlot++;
            }
        }