Skip to content

Commit dee7289

Browse files
committed
Fix the RV64 and LA64 builds
1 parent 30dc925 commit dee7289

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libraries/System.Private.CoreLib/src/System/Math.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ public static double MinMagnitude(double x, double y)
11981198
[Intrinsic]
11991199
public static double ReciprocalEstimate(double d)
12001200
{
1201-
#if MONO
1201+
#if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64
12021202
return 1.0 / d;
12031203
#else
12041204
return ReciprocalEstimate(d);
@@ -1215,7 +1215,7 @@ public static double ReciprocalEstimate(double d)
12151215
[Intrinsic]
12161216
public static double ReciprocalSqrtEstimate(double d)
12171217
{
1218-
#if MONO
1218+
#if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64
12191219
return 1.0 / Sqrt(d);
12201220
#else
12211221
return ReciprocalSqrtEstimate(d);

src/libraries/System.Private.CoreLib/src/System/MathF.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public static float MinMagnitude(float x, float y)
316316
[Intrinsic]
317317
public static float ReciprocalEstimate(float x)
318318
{
319-
#if MONO
319+
#if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64
320320
return 1.0f / x;
321321
#else
322322
return ReciprocalEstimate(x);
@@ -334,7 +334,7 @@ public static float ReciprocalEstimate(float x)
334334
[Intrinsic]
335335
public static float ReciprocalSqrtEstimate(float x)
336336
{
337-
#if MONO
337+
#if MONO || TARGET_RISCV64 || TARGET_LOONGARCH64
338338
return 1.0f / Sqrt(x);
339339
#else
340340
return ReciprocalSqrtEstimate(x);

0 commit comments

Comments
 (0)