From 8624dd8de63d60b8244badf483a305eaf9154d51 Mon Sep 17 00:00:00 2001 From: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> Date: Thu, 13 Aug 2020 17:08:48 +0200 Subject: [PATCH] Fix MacroJit SubtractWithBorrow Alu Reg Operation. (#1473) --- Ryujinx.Graphics.Gpu/Engine/MME/MacroJitCompiler.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Ryujinx.Graphics.Gpu/Engine/MME/MacroJitCompiler.cs b/Ryujinx.Graphics.Gpu/Engine/MME/MacroJitCompiler.cs index 524f51e4..e752b9dc 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MME/MacroJitCompiler.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MME/MacroJitCompiler.cs @@ -358,11 +358,12 @@ namespace Ryujinx.Graphics.Gpu.Engine.MME _ilGen.Emit(OpCodes.Conv_U8); EmitLoadGprB(opCode); _ilGen.Emit(OpCodes.Conv_U8); + _ilGen.Emit(OpCodes.Ldc_I4_1); _ilGen.Emit(OpCodes.Ldloc_S, _carry); - _ilGen.Emit(OpCodes.Conv_U8); - _ilGen.Emit(OpCodes.Neg); _ilGen.Emit(OpCodes.Sub); - _ilGen.Emit(OpCodes.Add); + _ilGen.Emit(OpCodes.Conv_U8); + _ilGen.Emit(OpCodes.Sub); + _ilGen.Emit(OpCodes.Sub); _ilGen.Emit(OpCodes.Dup); _ilGen.Emit(OpCodes.Ldc_I8, 0x100000000L); _ilGen.Emit(OpCodes.Clt_Un);