aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64
diff options
context:
space:
mode:
authorLordmau5 <mail@lordmau5.com>2018-06-12 14:29:16 +0200
committergdkchan <gab.dark.100@gmail.com>2018-06-12 09:29:16 -0300
commit46dc89f8dd7fc6fa75d3255a49e89a4615e1e504 (patch)
tree36dbeb8969133f56663682124a9b5ae5c34b69e5 /ChocolArm64
parent9176180abb119ff76c4f63eac09343faee686a18 (diff)
Implement Fabs_V (#146)
Diffstat (limited to 'ChocolArm64')
-rw-r--r--ChocolArm64/AOpCodeTable.cs1
-rw-r--r--ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs8
2 files changed, 9 insertions, 0 deletions
diff --git a/ChocolArm64/AOpCodeTable.cs b/ChocolArm64/AOpCodeTable.cs
index 3500fba0..5bddc3b9 100644
--- a/ChocolArm64/AOpCodeTable.cs
+++ b/ChocolArm64/AOpCodeTable.cs
@@ -206,6 +206,7 @@ namespace ChocolArm64
SetA64("0>101110000xxxxx0<xxx0xxxxxxxxxx", AInstEmit.Ext_V, typeof(AOpCodeSimdExt));
SetA64("011111101x1xxxxx110101xxxxxxxxxx", AInstEmit.Fabd_S, typeof(AOpCodeSimdReg));
SetA64("000111100x100000110000xxxxxxxxxx", AInstEmit.Fabs_S, typeof(AOpCodeSimd));
+ 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("0>1011100<1xxxxx110101xxxxxxxxxx", AInstEmit.Faddp_V, typeof(AOpCodeSimdReg));
diff --git a/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs b/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs
index 0dfe0bd3..5aea6b04 100644
--- a/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs
+++ b/ChocolArm64/Instruction/AInstEmitSimdArithmetic.cs
@@ -309,6 +309,14 @@ namespace ChocolArm64.Instruction
});
}
+ public static void Fabs_V(AILEmitterCtx Context)
+ {
+ EmitVectorUnaryOpF(Context, () =>
+ {
+ EmitUnaryMathCall(Context, nameof(Math.Abs));
+ });
+ }
+
public static void Fadd_S(AILEmitterCtx Context)
{
if (AOptimizations.UseSse2)