From c99b2884e4eb9adfb5b893ee84d7678262d19b06 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 3 Jul 2018 21:54:05 -0300 Subject: [PATCH] Remove broken adds/cmn with condition check optimization (#218) --- ChocolArm64/Instruction/AInstEmitAlu.cs | 2 -- ChocolArm64/Translation/AILEmitterCtx.cs | 5 ----- 2 files changed, 7 deletions(-) diff --git a/ChocolArm64/Instruction/AInstEmitAlu.cs b/ChocolArm64/Instruction/AInstEmitAlu.cs index 0e546f7a..490387e1 100644 --- a/ChocolArm64/Instruction/AInstEmitAlu.cs +++ b/ChocolArm64/Instruction/AInstEmitAlu.cs @@ -50,8 +50,6 @@ namespace ChocolArm64.Instruction public static void Adds(AILEmitterCtx Context) { - Context.TryOptMarkCondWithoutCmp(); - EmitDataLoadOpers(Context); Context.Emit(OpCodes.Add); diff --git a/ChocolArm64/Translation/AILEmitterCtx.cs b/ChocolArm64/Translation/AILEmitterCtx.cs index a004a966..3fa46e96 100644 --- a/ChocolArm64/Translation/AILEmitterCtx.cs +++ b/ChocolArm64/Translation/AILEmitterCtx.cs @@ -187,11 +187,6 @@ namespace ChocolArm64.Translation Ldloc(Tmp3Index, AIoType.Int, OptOpLastCompare.RegisterSize); Ldloc(Tmp4Index, AIoType.Int, OptOpLastCompare.RegisterSize); - if (OptOpLastCompare.Emitter == AInstEmit.Adds) - { - Emit(OpCodes.Neg); - } - ILOp = BranchOps[Cond]; } else if (IntCond < 14)