Files
ryujinx/src/Ryujinx.HLE/HOS/Tamper/Operations/OpOr.cs

27 lines
739 B
C#

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