Tamper generic explosion and code style

This commit is contained in:
Aaron Robinson
2025-11-19 22:28:50 -06:00
parent b9da6a15d7
commit 529d6f44bb
30 changed files with 180 additions and 98 deletions

View File

@@ -2,6 +2,13 @@ using System.Numerics;
namespace Ryujinx.HLE.HOS.Tamper.Operations
{
sealed class OpXorFactory : IOperationFactory
{
private OpXorFactory() { }
public static IOperation CreateFor<T>(IOperand destination, IOperand lhs, IOperand rhs) where T : unmanaged, IBinaryInteger<T>
=> new OpXor<T>(destination, lhs, rhs);
}
class OpXor<T> : IOperation where T : unmanaged, IBinaryNumber<T>
{
readonly IOperand _destination;
@@ -19,8 +26,5 @@ namespace Ryujinx.HLE.HOS.Tamper.Operations
{
_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 OpXor<T1>(destination, lhs, rhs);
}
}