mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-31 01:19:16 +00:00
Remove dynamic usage from Ryujinx.HLE (will come back to make this not generic explode)
This commit is contained in:
@@ -37,27 +37,27 @@ namespace Ryujinx.HLE.HOS.Tamper.CodeEmitters
|
||||
ulong immediate = InstructionHelper.GetImmediate(instruction, ValueImmediateIndex, ValueImmediateSize);
|
||||
Value<ulong> rightHandSideValue = new(immediate);
|
||||
|
||||
void Emit(Type operationType)
|
||||
void EmitCore<TOp>() where TOp : IOperation
|
||||
{
|
||||
InstructionHelper.Emit(operationType, operationWidth, context, register, register, rightHandSideValue);
|
||||
InstructionHelper.Emit<TOp>(operationWidth, context, register, register, rightHandSideValue);
|
||||
}
|
||||
|
||||
switch (operation)
|
||||
{
|
||||
case Add:
|
||||
Emit(typeof(OpAdd<>));
|
||||
EmitCore<OpAdd<byte>>();
|
||||
break;
|
||||
case Sub:
|
||||
Emit(typeof(OpSub<>));
|
||||
EmitCore<OpAdd<byte>>();
|
||||
break;
|
||||
case Mul:
|
||||
Emit(typeof(OpMul<>));
|
||||
EmitCore<OpMul<byte>>();
|
||||
break;
|
||||
case Lsh:
|
||||
Emit(typeof(OpLsh<>));
|
||||
EmitCore<OpLsh<byte>>();
|
||||
break;
|
||||
case Rsh:
|
||||
Emit(typeof(OpRsh<>));
|
||||
EmitCore<OpRsh<byte>>();
|
||||
break;
|
||||
default:
|
||||
throw new TamperCompilationException($"Invalid arithmetic operation {operation} in Atmosphere cheat");
|
||||
|
||||
Reference in New Issue
Block a user