aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Instruction
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-03-09 23:41:05 -0300
committergdkchan <gab.dark.100@gmail.com>2018-03-09 23:41:05 -0300
commit30bcb8da33c328be1abd922b0a6a95dc5c4d6c64 (patch)
treeb96bbe5bf7e1373ef632ee0d8b197e20aa5a7407 /ChocolArm64/Instruction
parentaa2d2b3149536792bf49a9d5695778efea64c53a (diff)
Add FRINTM (vector) instruction
Diffstat (limited to 'ChocolArm64/Instruction')
-rw-r--r--ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs8
-rw-r--r--ChocolArm64/Instruction/AInstEmitSimdHelper.cs5
2 files changed, 13 insertions, 0 deletions
diff --git a/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs b/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs
index b2d190f1..bf980a58 100644
--- a/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs
+++ b/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs
@@ -267,6 +267,14 @@ namespace ChocolArm64.Instruction
});
}
+ public static void Frintm_V(AILEmitterCtx Context)
+ {
+ EmitVectorUnaryOpF(Context, () =>
+ {
+ EmitUnaryMathCall(Context, nameof(Math.Floor));
+ });
+ }
+
public static void Frintp_S(AILEmitterCtx Context)
{
EmitScalarUnaryOpF(Context, () =>
diff --git a/ChocolArm64/Instruction/AInstEmitSimdHelper.cs b/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
index e6ead99a..1f78b71a 100644
--- a/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
+++ b/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
@@ -190,6 +190,11 @@ namespace ChocolArm64.Instruction
EmitScalarSetF(Context, Op.Rd, SizeF);
}
+ public static void EmitVectorUnaryOpF(AILEmitterCtx Context, Action Emit)
+ {
+ EmitVectorOpF(Context, Emit, OperFlags.Rn);
+ }
+
public static void EmitVectorBinaryOpF(AILEmitterCtx Context, Action Emit)
{
EmitVectorOpF(Context, Emit, OperFlags.RnRm);