aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-06-18 00:41:28 -0300
committergdkchan <gab.dark.100@gmail.com>2018-06-18 00:41:28 -0300
commitb747b23607179c710f7ac199fed9f10f8db7b3c1 (patch)
tree30a5f28eb1101dddf72f6c415e52d971f4820570
parent4e430760b4f5b50284459ccdc6439af65ed5862c (diff)
Add the FADDP (scalar) instruction
-rw-r--r--ChocolArm64/AOpCodeTable.cs1
-rw-r--r--ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs14
2 files changed, 15 insertions, 0 deletions
diff --git a/ChocolArm64/AOpCodeTable.cs b/ChocolArm64/AOpCodeTable.cs
index 5bddc3b9..903d6e0f 100644
--- a/ChocolArm64/AOpCodeTable.cs
+++ b/ChocolArm64/AOpCodeTable.cs
@@ -209,6 +209,7 @@ namespace ChocolArm64
SetA64("0>0011101<100000111110xxxxxxxxxx", AInstEmit.Fabs_V, typeof(AOpCodeSimd));
SetA64("000111100x1xxxxx001010xxxxxxxxxx", AInstEmit.Fadd_S, typeof(AOpCodeSimdReg));
SetA64("0>0011100<1xxxxx110101xxxxxxxxxx", AInstEmit.Fadd_V, typeof(AOpCodeSimdReg));
+ SetA64("011111100x110000110110xxxxxxxxxx", AInstEmit.Faddp_S, typeof(AOpCodeSimd));
SetA64("0>1011100<1xxxxx110101xxxxxxxxxx", AInstEmit.Faddp_V, typeof(AOpCodeSimdReg));
SetA64("000111100x1xxxxxxxxx01xxxxx0xxxx", AInstEmit.Fccmp_S, typeof(AOpCodeSimdFcond));
SetA64("000111100x1xxxxxxxxx01xxxxx1xxxx", AInstEmit.Fccmpe_S, typeof(AOpCodeSimdFcond));
diff --git a/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs b/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs
index 5aea6b04..49a5c506 100644
--- a/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs
+++ b/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs
@@ -341,6 +341,20 @@ namespace ChocolArm64.Instruction
}
}
+ public static void Faddp_S(AILEmitterCtx Context)
+ {
+ AOpCodeSimd Op = (AOpCodeSimd)Context.CurrOp;
+
+ int SizeF = Op.Size & 1;
+
+ EmitVectorExtractF(Context, Op.Rn, 0, SizeF);
+ EmitVectorExtractF(Context, Op.Rn, 1, SizeF);
+
+ Context.Emit(OpCodes.Add);
+
+ EmitScalarSetF(Context, Op.Rd, SizeF);
+ }
+
public static void Faddp_V(AILEmitterCtx Context)
{
AOpCodeSimdReg Op = (AOpCodeSimdReg)Context.CurrOp;