Beispiel #1
0
 public void SetRegister(XSRegisters.Register register)
 {
   mRegister = register;
 }
Beispiel #2
0
 protected static void CopyValue(XSRegisters.Register32 destination, int destinationDisplacement, XSRegisters.Register32 source, int sourceDisplacement, uint size)
 {
   for (int i = 0; i < (size / 4); i++)
   {
     XS.Set(XSRegisters.EAX, source, sourceDisplacement: sourceDisplacement + (i * 4));
     XS.Set(destination, XSRegisters.EAX, destinationDisplacement: destinationDisplacement + (i * 4));
   }
   switch (size % 4)
   {
     case 1:
       XS.Set(XSRegisters.AL, source, sourceDisplacement: (int)(sourceDisplacement + ((size / 4) * 4)));
       XS.Set(destination, XSRegisters.AL, destinationDisplacement: (int)(destinationDisplacement + ((size / 4) * 4)));
       break;
     case 2:
       XS.Set(XSRegisters.AX, source, sourceDisplacement: (int)(sourceDisplacement + ((size / 4) * 4)));
       XS.Set(destination, XSRegisters.AX, destinationDisplacement: (int)(destinationDisplacement + ((size / 4) * 4)));
       break;
     case 0:
       break;
     default:
       throw new NotImplementedException();
   }
 }