Skip to content

Commit

Permalink
Fix[arm32]: Disable InlineIntrinsics on arm32 by default
Browse files Browse the repository at this point in the history
Fixes issues with math that break Minecraft
  • Loading branch information
artdeell authored Nov 24, 2024
1 parent 5f86297 commit 8cb72d3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions patches/jre_21/android/jdk21u_android.diff
Original file line number Diff line number Diff line change
Expand Up @@ -2497,3 +2497,30 @@ index c6e012ecf..d4f956756 100644
+ }

#endif // OS_CPU_LINUX_AARCH64_JAVATHREAD_LINUX_AARCH64_HPP
diff --git a/src/hotspot/cpu/arm/c1_globals_arm.hpp b/src/hotspot/cpu/arm/c1_globals_arm.hpp
index d22d39d63..3e0d9a1cd 100644
--- a/src/hotspot/cpu/arm/c1_globals_arm.hpp
+++ b/src/hotspot/cpu/arm/c1_globals_arm.hpp
@@ -35,7 +35,7 @@

#ifndef COMPILER2 // avoid duplicated definitions, favoring C2 version
define_pd_global(bool, BackgroundCompilation, true );
-define_pd_global(bool, InlineIntrinsics, true );
+define_pd_global(bool, InlineIntrinsics, false); // Making it true breaks java.lang.Math
define_pd_global(bool, PreferInterpreterNativeStubs, false);
define_pd_global(bool, ProfileTraps, false);
define_pd_global(bool, UseOnStackReplacement, true );
diff --git a/src/hotspot/cpu/arm/c2_globals_arm.hpp b/src/hotspot/cpu/arm/c2_globals_arm.hpp
index 57ed8f11c..02476a05b 100644
--- a/src/hotspot/cpu/arm/c2_globals_arm.hpp
+++ b/src/hotspot/cpu/arm/c2_globals_arm.hpp
@@ -34,7 +34,7 @@

define_pd_global(bool, BackgroundCompilation, true);
define_pd_global(bool, CICompileOSR, true);
-define_pd_global(bool, InlineIntrinsics, true);
+define_pd_global(bool, InlineIntrinsics, false); // Making it true breaks java.lang.Math
define_pd_global(bool, PreferInterpreterNativeStubs, false);
define_pd_global(bool, ProfileTraps, true);
define_pd_global(bool, UseOnStackReplacement, true);

0 comments on commit 8cb72d3

Please sign in to comment.