Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. ...
  2. class Simplification
  3.  
  4. operation exclusive-or
  5.  
  6. else if (IsConstEqual(x, AllOnes(operation.Destination.Type)))
  7. {
  8.         operation.TurnInto(
  9.                 Instruction.BitwiseNot,
  10.                 y
  11.         );
  12.         return true;
  13. }
  14.  
  15. ...
  16. class Operation
  17.  
  18. public void TurnInto(Instruction instruction, Operand destination, [NotNull] params Operand[] sources)
  19. {
  20.         Instruction = instruction;
  21.  
  22.         if (Destination != destination)
  23.         {
  24.                 SetDestination(destination);
  25.         }
  26.  
  27.         SetSources(sources);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement