Skip to content

Commit

Permalink
Remove fmod workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
swesonga committed Nov 18, 2024
1 parent 92b2631 commit 1ce1f18
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 183 deletions.
159 changes: 0 additions & 159 deletions src/hotspot/os/windows/sharedRuntimeRem.cpp

This file was deleted.

24 changes: 0 additions & 24 deletions src/hotspot/share/runtime/sharedRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,35 +293,11 @@ const julong double_infinity = CONST64(0x7FF0000000000000);

#if !defined(X86)
JRT_LEAF(jfloat, SharedRuntime::frem(jfloat x, jfloat y))
#ifdef _WIN64
// 64-bit Windows on amd64 returns the wrong values for
// infinity operands.
juint xbits = PrimitiveConversions::cast<juint>(x);
juint ybits = PrimitiveConversions::cast<juint>(y);
// x Mod Infinity == x unless x is infinity
if (((xbits & float_sign_mask) != float_infinity) &&
((ybits & float_sign_mask) == float_infinity) ) {
return x;
}
return ((jfloat)fmod_winx64((double)x, (double)y));
#else
return ((jfloat)fmod((double)x,(double)y));
#endif
JRT_END

JRT_LEAF(jdouble, SharedRuntime::drem(jdouble x, jdouble y))
#ifdef _WIN64
julong xbits = PrimitiveConversions::cast<julong>(x);
julong ybits = PrimitiveConversions::cast<julong>(y);
// x Mod Infinity == x unless x is infinity
if (((xbits & double_sign_mask) != double_infinity) &&
((ybits & double_sign_mask) == double_infinity) ) {
return x;
}
return ((jdouble)fmod_winx64((double)x, (double)y));
#else
return ((jdouble)fmod((double)x,(double)y));
#endif
JRT_END
#endif // !X86

Expand Down

0 comments on commit 1ce1f18

Please sign in to comment.