OpAdd.cs 504 B

123456789101112131415161718192021
  1. namespace Ryujinx.HLE.HOS.Tamper.Operations
  2. {
  3. class OpAdd<T> : IOperation where T : unmanaged
  4. {
  5. IOperand _destination;
  6. IOperand _lhs;
  7. IOperand _rhs;
  8. public OpAdd(IOperand destination, IOperand lhs, IOperand rhs)
  9. {
  10. _destination = destination;
  11. _lhs = lhs;
  12. _rhs = rhs;
  13. }
  14. public void Execute()
  15. {
  16. _destination.Set((T)((dynamic)_lhs.Get<T>() + (dynamic)_rhs.Get<T>()));
  17. }
  18. }
  19. }