using System.Numerics; namespace Ryujinx.HLE.HOS.Tamper.Operations { sealed class OpXorFactory : IOperationFactory { private OpXorFactory() { } public static IOperation CreateFor(IOperand destination, IOperand lhs, IOperand rhs) where T : unmanaged, IBinaryInteger => new OpXor(destination, lhs, rhs); } class OpXor : IOperation where T : unmanaged, IBinaryNumber { readonly IOperand _destination; readonly IOperand _lhs; readonly IOperand _rhs; public OpXor(IOperand destination, IOperand lhs, IOperand rhs) { _destination = destination; _lhs = lhs; _rhs = rhs; } public void Execute() { _destination.Set(_lhs.Get() ^ _rhs.Get()); } } }