aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
diff options
context:
space:
mode:
authorMerry <MerryMage@users.noreply.github.com>2018-04-06 00:36:19 +0100
committergdkchan <gab.dark.100@gmail.com>2018-04-05 20:36:19 -0300
commit39f20d8d1ad9e52741bb6bb28b1ba24c6e759aec (patch)
tree9302306b7c020a7fa677ad551423084ff85da0c9 /ChocolArm64/Instruction/AInstEmitSimdHelper.cs
parent4c19c908e5d0c7e5d305fa816c53c9787432b83c (diff)
Implement Frsqrte_S (#72)
* Implement Frsqrte_S * Implement Frsqrte_V * Add Frsqrte_S test
Diffstat (limited to 'ChocolArm64/Instruction/AInstEmitSimdHelper.cs')
-rw-r--r--ChocolArm64/Instruction/AInstEmitSimdHelper.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/ChocolArm64/Instruction/AInstEmitSimdHelper.cs b/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
index 9a749ec6..b66419bd 100644
--- a/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
+++ b/ChocolArm64/Instruction/AInstEmitSimdHelper.cs
@@ -100,6 +100,26 @@ namespace ChocolArm64.Instruction
Context.EmitCall(MthdInfo);
}
+ public static void EmitUnarySoftFloatCall(AILEmitterCtx Context, string Name)
+ {
+ IAOpCodeSimd Op = (IAOpCodeSimd)Context.CurrOp;
+
+ int SizeF = Op.Size & 1;
+
+ MethodInfo MthdInfo;
+
+ if (SizeF == 0)
+ {
+ MthdInfo = typeof(ASoftFloat).GetMethod(Name, new Type[] { typeof(float) });
+ }
+ else /* if (SizeF == 1) */
+ {
+ MthdInfo = typeof(ASoftFloat).GetMethod(Name, new Type[] { typeof(double) });
+ }
+
+ Context.EmitCall(MthdInfo);
+ }
+
public static void EmitScalarUnaryOpSx(AILEmitterCtx Context, Action Emit)
{
EmitScalarOp(Context, Emit, OperFlags.Rn, true);