From dee7289761414d5d8bddd861a90fedb34da117f0 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Fri, 10 May 2024 14:29:20 -0700 Subject: [PATCH] Fix the RV64 and LA64 builds --- src/libraries/System.Private.CoreLib/src/System/Math.cs | 4 ++-- src/libraries/System.Private.CoreLib/src/System/MathF.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Math.cs b/src/libraries/System.Private.CoreLib/src/System/Math.cs index 5b26cd70981580..c66f597d5aa26a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Math.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Math.cs @@ -1198,7 +1198,7 @@ public static double MinMagnitude(double x, double y) [Intrinsic] public static double ReciprocalEstimate(double d) { -#if MONO +#if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64 return 1.0 / d; #else return ReciprocalEstimate(d); @@ -1215,7 +1215,7 @@ public static double ReciprocalEstimate(double d) [Intrinsic] public static double ReciprocalSqrtEstimate(double d) { -#if MONO +#if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64 return 1.0 / Sqrt(d); #else return ReciprocalSqrtEstimate(d); diff --git a/src/libraries/System.Private.CoreLib/src/System/MathF.cs b/src/libraries/System.Private.CoreLib/src/System/MathF.cs index 7ca477044d2cf4..32e9e194a4c916 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MathF.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MathF.cs @@ -316,7 +316,7 @@ public static float MinMagnitude(float x, float y) [Intrinsic] public static float ReciprocalEstimate(float x) { -#if MONO +#if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64 return 1.0f / x; #else return ReciprocalEstimate(x); @@ -334,7 +334,7 @@ public static float ReciprocalEstimate(float x) [Intrinsic] public static float ReciprocalSqrtEstimate(float x) { -#if MONO +#if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64 return 1.0f / Sqrt(x); #else return ReciprocalSqrtEstimate(x);