mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2026-03-11 22:15:34 +00:00
24 lines
667 B
C#
24 lines
667 B
C#
using System.Numerics;
|
|
|
|
namespace Ryujinx.HLE.HOS.Tamper.Operations
|
|
{
|
|
class OpNot<T> : IOperation where T : unmanaged, IBinaryNumber<T>
|
|
{
|
|
readonly IOperand _destination;
|
|
readonly IOperand _source;
|
|
|
|
public OpNot(IOperand destination, IOperand source)
|
|
{
|
|
_destination = destination;
|
|
_source = source;
|
|
}
|
|
|
|
public void Execute()
|
|
{
|
|
_destination.Set(~_source.Get<T>());
|
|
}
|
|
|
|
public static IOperation CreateFor<T1>(IOperand destination, IOperand lhs, IOperand rhs) where T1 : unmanaged, IBinaryInteger<T1>
|
|
=> new OpNot<T1>(destination, lhs);
|
|
}
|
|
}
|