aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Instruction/AVectorHelper.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-08-05 02:54:21 -0300
committerGitHub <noreply@github.com>2018-08-05 02:54:21 -0300
commit221270db90300a084007d154867be89bb5fddedf (patch)
treeab98d6b5beed0386de740f6d503e19d9729ed5ce /ChocolArm64/Instruction/AVectorHelper.cs
parenteeb626947eac81b9d9d9a90ad6e29035c21d54a7 (diff)
More accurate impl of FMINNM/FMAXNM, add vector variants (#296)
* More accurate impl of FMINNM/FMAXNM, add vector variants * Optimize for the 0 case when op1 != op2 * Address PR feedback
Diffstat (limited to 'ChocolArm64/Instruction/AVectorHelper.cs')
-rw-r--r--ChocolArm64/Instruction/AVectorHelper.cs80
1 files changed, 0 insertions, 80 deletions
diff --git a/ChocolArm64/Instruction/AVectorHelper.cs b/ChocolArm64/Instruction/AVectorHelper.cs
index a0f887b0..b2d53740 100644
--- a/ChocolArm64/Instruction/AVectorHelper.cs
+++ b/ChocolArm64/Instruction/AVectorHelper.cs
@@ -93,86 +93,6 @@ namespace ChocolArm64.Instruction
Value < ulong.MinValue ? ulong.MinValue : (ulong)Value;
}
- public static double Max(double LHS, double RHS)
- {
- if (LHS == 0.0 && RHS == 0.0)
- {
- if (BitConverter.DoubleToInt64Bits(LHS) < 0 &&
- BitConverter.DoubleToInt64Bits(RHS) < 0)
- return -0.0;
-
- return 0.0;
- }
-
- if (LHS > RHS)
- return LHS;
-
- if (double.IsNaN(LHS))
- return LHS;
-
- return RHS;
- }
-
- public static float MaxF(float LHS, float RHS)
- {
- if (LHS == 0.0 && RHS == 0.0)
- {
- if (BitConverter.SingleToInt32Bits(LHS) < 0 &&
- BitConverter.SingleToInt32Bits(RHS) < 0)
- return -0.0f;
-
- return 0.0f;
- }
-
- if (LHS > RHS)
- return LHS;
-
- if (float.IsNaN(LHS))
- return LHS;
-
- return RHS;
- }
-
- public static double Min(double LHS, double RHS)
- {
- if (LHS == 0.0 && RHS == 0.0)
- {
- if (BitConverter.DoubleToInt64Bits(LHS) < 0 ||
- BitConverter.DoubleToInt64Bits(RHS) < 0)
- return -0.0;
-
- return 0.0;
- }
-
- if (LHS < RHS)
- return LHS;
-
- if (double.IsNaN(LHS))
- return LHS;
-
- return RHS;
- }
-
- public static float MinF(float LHS, float RHS)
- {
- if (LHS == 0.0 && RHS == 0.0)
- {
- if (BitConverter.SingleToInt32Bits(LHS) < 0 ||
- BitConverter.SingleToInt32Bits(RHS) < 0)
- return -0.0f;
-
- return 0.0f;
- }
-
- if (LHS < RHS)
- return LHS;
-
- if (float.IsNaN(LHS))
- return LHS;
-
- return RHS;
- }
-
public static double Round(double Value, int Fpcr)
{
switch ((ARoundMode)((Fpcr >> 22) & 3))