From e54a0ff9c6851f093b65807f02f071fcc60c59d6 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 23 May 2018 00:27:48 -0300 Subject: [PATCH] Remove some calls generated on the CPU for inexistent intrinsic methods --- Instruction/AInstEmitSimdCmp.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Instruction/AInstEmitSimdCmp.cs b/Instruction/AInstEmitSimdCmp.cs index 583ad70..8a8376b 100644 --- a/Instruction/AInstEmitSimdCmp.cs +++ b/Instruction/AInstEmitSimdCmp.cs @@ -14,7 +14,7 @@ namespace ChocolArm64.Instruction { public static void Cmeq_V(AILEmitterCtx Context) { - if (AOptimizations.UseSse2 && Context.CurrOp is AOpCodeSimdReg) + if (AOptimizations.UseSse2 && Context.CurrOp is AOpCodeSimdReg Op && Op.Size < 3) { EmitSse2Call(Context, nameof(Sse2.CompareEqual)); } @@ -26,19 +26,12 @@ namespace ChocolArm64.Instruction public static void Cmge_V(AILEmitterCtx Context) { - if (AOptimizations.UseSse2 && Context.CurrOp is AOpCodeSimdReg) - { - EmitSse2Call(Context, nameof(Sse2.CompareGreaterThanOrEqual)); - } - else - { - EmitVectorCmp(Context, OpCodes.Bge_S); - } + EmitVectorCmp(Context, OpCodes.Bge_S); } public static void Cmgt_V(AILEmitterCtx Context) { - if (AOptimizations.UseSse2 && Context.CurrOp is AOpCodeSimdReg) + if (AOptimizations.UseSse2 && Context.CurrOp is AOpCodeSimdReg Op && Op.Size < 3) { EmitSse2Call(Context, nameof(Sse2.CompareGreaterThan)); }