diff options
| author | Merry <MerryMage@users.noreply.github.com> | 2018-04-06 00:36:19 +0100 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-04-05 20:36:19 -0300 |
| commit | 39f20d8d1ad9e52741bb6bb28b1ba24c6e759aec (patch) | |
| tree | 9302306b7c020a7fa677ad551423084ff85da0c9 /ChocolArm64/Instruction/AInstEmitSimdHelper.cs | |
| parent | 4c19c908e5d0c7e5d305fa816c53c9787432b83c (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.cs | 20 |
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); |
