Inheritance: AddressableInstruction
Example #1
0
 public void MapBranchAddress(IDictionary <int, AddressableInstruction> instructionDictionary, IDictionary <String, AddressableInstruction> labeledInstructionDictionary)
 {
     if (this.AutoBranchNext)
     {
         // Auto branch instructions just need to branch to the next instruction in the source code.
         int nextInstructionSourceAddress             = this.Address.SourceAddress + this.SourceLength;
         ExecutableInstruction destinationInstruction = instructionDictionary[nextInstructionSourceAddress] as ExecutableInstruction;
         this.MapBranchAddress(destinationInstruction);
     }
     else
     {
         if (this.BranchAddress.IsLabelledAddress)
         {
             // If the branch is a label, resolve the labeled instruction...
             ExecutableInstruction destinationInstruction = labeledInstructionDictionary[this.BranchAddress.AddressLabel] as ExecutableInstruction;
             this.MapBranchAddress(destinationInstruction);
         }
         else if (this.BranchAddress.SourceAddress != -1)
         {
             // ...Otherwise, resolve the destination from the branch source address.
             ExecutableInstruction destinationInstruction = instructionDictionary[this.BranchAddress.SourceAddress] as ExecutableInstruction;
             this.MapBranchAddress(destinationInstruction);
         }
     }
 }
Example #2
0
 private void MapBranchAddress(ExecutableInstruction destinationInstruction)
 {
     this.BranchDestination = destinationInstruction;
 }
Example #3
0
 private void MapBranchAddress(ExecutableInstruction destinationInstruction)
 {
     this.BranchDestination = destinationInstruction;
 }