aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Instructions
diff options
context:
space:
mode:
authorLDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>2019-10-31 19:09:03 +0100
committerAc_K <Acoustik666@gmail.com>2019-10-31 19:09:03 +0100
commiteee639d6ba544fa5dd9352426d55e91bc54e157d (patch)
tree1df440ca57d8c1725e84f403fbeecddb8e508a3a /ARMeilleure/Instructions
parent35443bac5a16ced668d84e0a22c21ca9076b3924 (diff)
.NET Core 3.0 is here! (#784)
* .NET Core 3.0 is here! * Remove IMemoryManager.cs and its references. * Add T Math/F.FusedMultiplyAdd(T, T, T). Nits. * Nit. * Update appveyor.yml * Revert "Resolve Visual Studio build issues" This reverts commit 1772128ce0fc058e6280001aace3a77a7a96897b. * Update SvcTable.cs
Diffstat (limited to 'ARMeilleure/Instructions')
-rw-r--r--ARMeilleure/Instructions/InstEmitSimdArithmetic.cs10
-rw-r--r--ARMeilleure/Instructions/SoftFloat.cs30
2 files changed, 10 insertions, 30 deletions
diff --git a/ARMeilleure/Instructions/InstEmitSimdArithmetic.cs b/ARMeilleure/Instructions/InstEmitSimdArithmetic.cs
index 44659e80..c411a6d3 100644
--- a/ARMeilleure/Instructions/InstEmitSimdArithmetic.cs
+++ b/ARMeilleure/Instructions/InstEmitSimdArithmetic.cs
@@ -1033,14 +1033,13 @@ namespace ARMeilleure.Instructions
}
}
- public static void Fnmadd_S(ArmEmitterContext context)
+ public static void Fnmadd_S(ArmEmitterContext context) // Fused.
{
OpCodeSimdReg op = (OpCodeSimdReg)context.CurrOp;
int sizeF = op.Size & 1;
- OperandType type = sizeF != 0 ? OperandType.FP64
- : OperandType.FP32;
+ OperandType type = sizeF != 0 ? OperandType.FP64 : OperandType.FP32;
Operand ne = context.VectorExtract(type, GetVec(op.Rn), 0);
Operand me = context.VectorExtract(type, GetVec(op.Rm), 0);
@@ -1051,14 +1050,13 @@ namespace ARMeilleure.Instructions
context.Copy(GetVec(op.Rd), context.VectorInsert(context.VectorZero(), res, 0));
}
- public static void Fnmsub_S(ArmEmitterContext context)
+ public static void Fnmsub_S(ArmEmitterContext context) // Fused.
{
OpCodeSimdReg op = (OpCodeSimdReg)context.CurrOp;
int sizeF = op.Size & 1;
- OperandType type = sizeF != 0 ? OperandType.FP64
- : OperandType.FP32;
+ OperandType type = sizeF != 0 ? OperandType.FP64 : OperandType.FP32;
Operand ne = context.VectorExtract(type, GetVec(op.Rn), 0);
Operand me = context.VectorExtract(type, GetVec(op.Rm), 0);
diff --git a/ARMeilleure/Instructions/SoftFloat.cs b/ARMeilleure/Instructions/SoftFloat.cs
index 7358e6b2..af22c85d 100644
--- a/ARMeilleure/Instructions/SoftFloat.cs
+++ b/ARMeilleure/Instructions/SoftFloat.cs
@@ -1073,10 +1073,7 @@ namespace ARMeilleure.Instructions
}
else
{
- // TODO: When available, use: T MathF.FusedMultiplyAdd(T, T, T);
- // https://github.com/dotnet/corefx/issues/31903
-
- result = valueA + (value1 * value2);
+ result = MathF.FusedMultiplyAdd(value1, value2, valueA);
if ((context.Fpcr & FPCR.Fz) != 0 && float.IsSubnormal(result))
{
@@ -1256,10 +1253,7 @@ namespace ARMeilleure.Instructions
}
else
{
- // TODO: When available, use: T MathF.FusedMultiplyAdd(T, T, T);
- // https://github.com/dotnet/corefx/issues/31903
-
- result = 2f + (value1 * value2);
+ result = MathF.FusedMultiplyAdd(value1, value2, 2f);
if ((context.Fpcr & FPCR.Fz) != 0 && float.IsSubnormal(result))
{
@@ -1388,10 +1382,7 @@ namespace ARMeilleure.Instructions
}
else
{
- // TODO: When available, use: T MathF.FusedMultiplyAdd(T, T, T);
- // https://github.com/dotnet/corefx/issues/31903
-
- result = (3f + (value1 * value2)) / 2f;
+ result = MathF.FusedMultiplyAdd(value1, value2, 3f) / 2f;
if ((context.Fpcr & FPCR.Fz) != 0 && float.IsSubnormal(result))
{
@@ -2142,10 +2133,7 @@ namespace ARMeilleure.Instructions
}
else
{
- // TODO: When available, use: T Math.FusedMultiplyAdd(T, T, T);
- // https://github.com/dotnet/corefx/issues/31903
-
- result = valueA + (value1 * value2);
+ result = Math.FusedMultiplyAdd(value1, value2, valueA);
if ((context.Fpcr & FPCR.Fz) != 0 && double.IsSubnormal(result))
{
@@ -2323,10 +2311,7 @@ namespace ARMeilleure.Instructions
}
else
{
- // TODO: When available, use: T Math.FusedMultiplyAdd(T, T, T);
- // https://github.com/dotnet/corefx/issues/31903
-
- result = 2d + (value1 * value2);
+ result = Math.FusedMultiplyAdd(value1, value2, 2d);
if ((context.Fpcr & FPCR.Fz) != 0 && double.IsSubnormal(result))
{
@@ -2455,10 +2440,7 @@ namespace ARMeilleure.Instructions
}
else
{
- // TODO: When available, use: T Math.FusedMultiplyAdd(T, T, T);
- // https://github.com/dotnet/corefx/issues/31903
-
- result = (3d + (value1 * value2)) / 2d;
+ result = Math.FusedMultiplyAdd(value1, value2, 3d) / 2d;
if ((context.Fpcr & FPCR.Fz) != 0 && double.IsSubnormal(result))
{