aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-03-06 21:36:49 -0300
committergdkchan <gab.dark.100@gmail.com>2018-03-06 21:36:49 -0300
commitbe0e4007dc92e24a77bdc36a40d2450c41d9b560 (patch)
tree66fa62381cba101e336000865a1c3e561f3298d5 /ChocolArm64/Instruction/AInstEmitSimdHelper.cs
parent4f177c9ee7452274f5e792349e9b443d78a27816 (diff)
Add SMLAL (vector), fix EXT instruction
Diffstat (limited to 'ChocolArm64/Instruction/AInstEmitSimdHelper.cs')
-rw-r--r--ChocolArm64/Instruction/AInstEmitSimdHelper.cs21
1 files changed, 18 insertions, 3 deletions
diff --git a/ChocolArm64/Instruction/AInstEmitSimdHelper.cs b/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
index 33e4d548..e6ead99a 100644
--- a/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
+++ b/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
@@ -459,15 +459,25 @@ namespace ChocolArm64.Instruction
public static void EmitVectorWidenRnRmBinaryOpSx(AILEmitterCtx Context, Action Emit)
{
- EmitVectorWidenRnRmBinaryOp(Context, Emit, true);
+ EmitVectorWidenRnRmOp(Context, Emit, false, true);
}
public static void EmitVectorWidenRnRmBinaryOpZx(AILEmitterCtx Context, Action Emit)
{
- EmitVectorWidenRnRmBinaryOp(Context, Emit, false);
+ EmitVectorWidenRnRmOp(Context, Emit, false, false);
}
- public static void EmitVectorWidenRnRmBinaryOp(AILEmitterCtx Context, Action Emit, bool Signed)
+ public static void EmitVectorWidenRnRmTernaryOpSx(AILEmitterCtx Context, Action Emit)
+ {
+ EmitVectorWidenRnRmOp(Context, Emit, true, true);
+ }
+
+ public static void EmitVectorWidenRnRmTernaryOpZx(AILEmitterCtx Context, Action Emit)
+ {
+ EmitVectorWidenRnRmOp(Context, Emit, true, false);
+ }
+
+ public static void EmitVectorWidenRnRmOp(AILEmitterCtx Context, Action Emit, bool Ternary, bool Signed)
{
AOpCodeSimdReg Op = (AOpCodeSimdReg)Context.CurrOp;
@@ -477,6 +487,11 @@ namespace ChocolArm64.Instruction
for (int Index = 0; Index < Elems; Index++)
{
+ if (Ternary)
+ {
+ EmitVectorExtract(Context, Op.Rd, Index, Op.Size + 1, Signed);
+ }
+
EmitVectorExtract(Context, Op.Rn, Part + Index, Op.Size, Signed);
EmitVectorExtract(Context, Op.Rm, Part + Index, Op.Size, Signed);