GetRegister() public abstract method

public abstract GetRegister ( RegisterStorage r ) : Constant
r RegisterStorage
return Constant
Beispiel #1
0
 private bool Matches(ProcessorState state)
 {
     for (int i = 0; i < RegisterValues.Length; ++i)
     {
         Constant v = state.GetRegister(RegisterValues[i].Register);
         if (v == null || v == Constant.Invalid)
         {
             return(false);
         }
         if (v.ToUInt32() != RegisterValues[i].Value)
         {
             return(false);
         }
     }
     if (StackValues != null && StackValues.Length > 0)
     {
         for (int i = 0; i < StackValues.Length; ++i)
         {
             var c = state.GetStackValue(StackValues[i].Offset) as Constant;
             if (c == null || c == Constant.Invalid)
             {
                 return(false);
             }
             if (c.ToUInt32() != StackValues[i].Value)
             {
                 return(false);
             }
         }
     }
     return(true);
 }
Beispiel #2
0
 public bool Matches(ProcessorState state)
 {
     if (state == null &&
         ((RegisterValues != null && RegisterValues.Length > 0) ||
          (StackValues != null && StackValues.Length > 0)))
     {
         return false;
     }
     for (int i = 0; i < RegisterValues.Length; ++i)
     {
         Constant v = state.GetRegister(RegisterValues[i].Register);
         if (v == null || v == Constant.Invalid)
             return false;
         if (v.ToUInt32() != RegisterValues[i].Value)
             return false;
     }
     if (StackValues != null && StackValues.Length > 0)
     {
         for (int i = 0; i < StackValues.Length; ++i)
         {
             var c = state.GetStackValue(StackValues[i].Offset) as Constant;
             if (c == null || c == Constant.Invalid)
                 return false;
             if (c.ToUInt32() != StackValues[i].Value)
                 return false;
         }
     }
     return true;
 }
Beispiel #3
0
 private bool Matches(ProcessorState state)
 {
     for (int i = 0; i < RegisterValues.Length; ++i)
     {
         Constant v = state.GetRegister(RegisterValues[i].Register);
         if (v == null || v == Constant.Invalid)
             return false;
         if (v.ToUInt32() != RegisterValues[i].Value)
             return false;
     }
     return true;
 }
Beispiel #4
0
 protected Address ReadSegmentedCodeAddress(int byteSize, ImageReader rdr, ProcessorState state)
 {
     if (byteSize == PrimitiveType.Word16.Size)
     {
         return Address.SegPtr(state.GetRegister(Registers.cs).ToUInt16(), rdr.ReadLeUInt16());
     }
     else
     {
         ushort off = rdr.ReadLeUInt16();
         ushort seg = rdr.ReadLeUInt16();
         return Address.SegPtr(seg, off);
     }
 }
Beispiel #5
0
 private bool Matches(ProcessorState state)
 {
     for (int i = 0; i < RegisterValues.Length; ++i)
     {
         Constant v = state.GetRegister(RegisterValues[i].Register);
         if (v == null || v == Constant.Invalid)
         {
             return(false);
         }
         if (v.ToUInt32() != RegisterValues[i].Value)
         {
             return(false);
         }
     }
     return(true);
 }