aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Instructions/InstEmitSimdArithmetic.cs
diff options
context:
space:
mode:
authorLDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>2019-07-08 16:55:37 +0200
committergdkchan <gab.dark.100@gmail.com>2019-07-08 11:55:37 -0300
commite5b88de22a6f228d83e741cf9bcff144b3eff25a (patch)
treed2bf5e065ceab3209237fecfd09f1adf7600f349 /ChocolArm64/Instructions/InstEmitSimdArithmetic.cs
parent708620252e837f2111213c6e36d5f8cc8cfd03e8 (diff)
Add Saddlv_V Inst. Improve Cnt_V, Dup_Gp & Ins_Gp Tests. Tuneup Cls_V & Clz_V Tests. (#720)
* Update PackageReferences. * Improve Cnt_V Test. Tuneup Cls_V & Clz_V Tests. Nit. * Nit. * Improve Dup_Gp & Ins_Gp Tests. * Update for Saddlv_V Inst. * Update for Saddlv_V Inst. * Update for Saddlv_V Inst.
Diffstat (limited to 'ChocolArm64/Instructions/InstEmitSimdArithmetic.cs')
-rw-r--r--ChocolArm64/Instructions/InstEmitSimdArithmetic.cs21
1 files changed, 6 insertions, 15 deletions
diff --git a/ChocolArm64/Instructions/InstEmitSimdArithmetic.cs b/ChocolArm64/Instructions/InstEmitSimdArithmetic.cs
index 8cf5c2c5..fa9666eb 100644
--- a/ChocolArm64/Instructions/InstEmitSimdArithmetic.cs
+++ b/ChocolArm64/Instructions/InstEmitSimdArithmetic.cs
@@ -2206,6 +2206,11 @@ namespace ChocolArm64.Instructions
EmitAddLongPairwise(context, signed: true, accumulate: false);
}
+ public static void Saddlv_V(ILEmitterCtx context)
+ {
+ EmitVectorLongAcrossVectorOpSx(context, () => context.Emit(OpCodes.Add));
+ }
+
public static void Saddw_V(ILEmitterCtx context)
{
if (Optimizations.UseSse41)
@@ -3041,21 +3046,7 @@ namespace ChocolArm64.Instructions
public static void Uaddlv_V(ILEmitterCtx context)
{
- OpCodeSimd64 op = (OpCodeSimd64)context.CurrOp;
-
- int bytes = op.GetBitsCount() >> 3;
- int elems = bytes >> op.Size;
-
- EmitVectorExtractZx(context, op.Rn, 0, op.Size);
-
- for (int index = 1; index < elems; index++)
- {
- EmitVectorExtractZx(context, op.Rn, index, op.Size);
-
- context.Emit(OpCodes.Add);
- }
-
- EmitScalarSet(context, op.Rd, op.Size + 1);
+ EmitVectorLongAcrossVectorOpZx(context, () => context.Emit(OpCodes.Add));
}
public static void Uaddw_V(ILEmitterCtx context)