aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Instructions/InstEmitSimdHelper.cs
diff options
context:
space:
mode:
authorLDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>2019-05-30 02:29:24 +0200
committergdkchan <gab.dark.100@gmail.com>2019-05-29 21:29:24 -0300
commit51ea6fa583fd52eabc5374b414e4052efab4128a (patch)
tree88923ae5641b6ec5cb24237c1c264182e480a806 /ChocolArm64/Instructions/InstEmitSimdHelper.cs
parent12badfffb94cc2dda128df4895668d1e2716de24 (diff)
Add Smaxv_V, Sminv_V, Umaxv_V, Uminv_V Inst.; add Tests. (#691)
* Update InstEmitSimdHelper.cs * Update InstEmitSimdArithmetic.cs * Update OpCodeTable.cs * Update CpuTestSimd.cs
Diffstat (limited to 'ChocolArm64/Instructions/InstEmitSimdHelper.cs')
-rw-r--r--ChocolArm64/Instructions/InstEmitSimdHelper.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/ChocolArm64/Instructions/InstEmitSimdHelper.cs b/ChocolArm64/Instructions/InstEmitSimdHelper.cs
index 2bcda35f..f343dba8 100644
--- a/ChocolArm64/Instructions/InstEmitSimdHelper.cs
+++ b/ChocolArm64/Instructions/InstEmitSimdHelper.cs
@@ -821,6 +821,35 @@ namespace ChocolArm64.Instructions
}
}
+ public static void EmitVectorAcrossVectorOpSx(ILEmitterCtx context, Action emit)
+ {
+ EmitVectorAcrossVectorOp(context, emit, true);
+ }
+
+ public static void EmitVectorAcrossVectorOpZx(ILEmitterCtx context, Action emit)
+ {
+ EmitVectorAcrossVectorOp(context, emit, false);
+ }
+
+ public static void EmitVectorAcrossVectorOp(ILEmitterCtx context, Action emit, bool signed)
+ {
+ OpCodeSimd64 op = (OpCodeSimd64)context.CurrOp;
+
+ int bytes = op.GetBitsCount() >> 3;
+ int elems = bytes >> op.Size;
+
+ EmitVectorExtract(context, op.Rn, 0, op.Size, signed);
+
+ for (int index = 1; index < elems; index++)
+ {
+ EmitVectorExtract(context, op.Rn, index, op.Size, signed);
+
+ emit();
+ }
+
+ EmitScalarSet(context, op.Rd, op.Size);
+ }
+
public static void EmitVectorPairwiseOpF(ILEmitterCtx context, Action emit)
{
OpCodeSimdReg64 op = (OpCodeSimdReg64)context.CurrOp;