예제 #1
0
 public virtual void AddSequence(InstructionSequence seq)
 {
     for (int i = 0; i < seq.Length(); i++)
     {
         AddInstruction(seq.GetInstr(i), -1);
     }
 }
예제 #2
0
        public override void InitInstruction(InstructionSequence seq)
        {
            defaultDestination = seq.GetPointerByRelOffset(operands[0]);
            int prefix = opcode == ICodeConstants.opc_tableswitch ? 3 : 2;
            int len    = operands.Length - prefix;
            int low    = 0;

            if (opcode == ICodeConstants.opc_lookupswitch)
            {
                len /= 2;
            }
            else
            {
                low = operands[1];
            }
            destinations = new int[len];
            values       = new int[len];
            for (int i = 0, k = 0; i < len; i++, k++)
            {
                if (opcode == ICodeConstants.opc_lookupswitch)
                {
                    values[i] = operands[prefix + k];
                    k++;
                }
                else
                {
                    values[i] = low + k;
                }
                destinations[i] = seq.GetPointerByRelOffset(operands[prefix + k]);
            }
        }
예제 #3
0
 public virtual void InitInstruction(InstructionSequence seq)
 {
 }
예제 #4
0
 public override void InitInstruction(InstructionSequence seq)
 {
     destination = seq.GetPointerByRelOffset(this.Operand(0));
 }