diff options
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Tamper/CodeEmitters/LegacyArithmetic.cs')
-rw-r--r-- | src/Ryujinx.HLE/HOS/Tamper/CodeEmitters/LegacyArithmetic.cs | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/Ryujinx.HLE/HOS/Tamper/CodeEmitters/LegacyArithmetic.cs b/src/Ryujinx.HLE/HOS/Tamper/CodeEmitters/LegacyArithmetic.cs index 479c80ec..1c389cd7 100644 --- a/src/Ryujinx.HLE/HOS/Tamper/CodeEmitters/LegacyArithmetic.cs +++ b/src/Ryujinx.HLE/HOS/Tamper/CodeEmitters/LegacyArithmetic.cs @@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Tamper.CodeEmitters /// </summary> class LegacyArithmetic { - const int OperationWidthIndex = 1; + const int OperationWidthIndex = 1; const int DestinationRegisterIndex = 3; const int OperationTypeIndex = 4; const int ValueImmediateIndex = 8; @@ -35,7 +35,7 @@ namespace Ryujinx.HLE.HOS.Tamper.CodeEmitters Register register = context.GetRegister(instruction[DestinationRegisterIndex]); byte operation = instruction[OperationTypeIndex]; ulong immediate = InstructionHelper.GetImmediate(instruction, ValueImmediateIndex, ValueImmediateSize); - Value<ulong> rightHandSideValue = new Value<ulong>(immediate); + Value<ulong> rightHandSideValue = new(immediate); void Emit(Type operationType) { @@ -44,11 +44,21 @@ namespace Ryujinx.HLE.HOS.Tamper.CodeEmitters switch (operation) { - case Add: Emit(typeof(OpAdd<>)); break; - case Sub: Emit(typeof(OpSub<>)); break; - case Mul: Emit(typeof(OpMul<>)); break; - case Lsh: Emit(typeof(OpLsh<>)); break; - case Rsh: Emit(typeof(OpRsh<>)); break; + case Add: + Emit(typeof(OpAdd<>)); + break; + case Sub: + Emit(typeof(OpSub<>)); + break; + case Mul: + Emit(typeof(OpMul<>)); + break; + case Lsh: + Emit(typeof(OpLsh<>)); + break; + case Rsh: + Emit(typeof(OpRsh<>)); + break; default: throw new TamperCompilationException($"Invalid arithmetic operation {operation} in Atmosphere cheat"); } |