Skip to content

Commit 8cb72d3

Browse files
authored
Fix[arm32]: Disable InlineIntrinsics on arm32 by default
Fixes issues with math that break Minecraft
1 parent 5f86297 commit 8cb72d3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

patches/jre_21/android/jdk21u_android.diff

+27
Original file line numberDiff line numberDiff line change
@@ -2497,3 +2497,30 @@ index c6e012ecf..d4f956756 100644
24972497
+ }
24982498

24992499
#endif // OS_CPU_LINUX_AARCH64_JAVATHREAD_LINUX_AARCH64_HPP
2500+
diff --git a/src/hotspot/cpu/arm/c1_globals_arm.hpp b/src/hotspot/cpu/arm/c1_globals_arm.hpp
2501+
index d22d39d63..3e0d9a1cd 100644
2502+
--- a/src/hotspot/cpu/arm/c1_globals_arm.hpp
2503+
+++ b/src/hotspot/cpu/arm/c1_globals_arm.hpp
2504+
@@ -35,7 +35,7 @@
2505+
2506+
#ifndef COMPILER2 // avoid duplicated definitions, favoring C2 version
2507+
define_pd_global(bool, BackgroundCompilation, true );
2508+
-define_pd_global(bool, InlineIntrinsics, true );
2509+
+define_pd_global(bool, InlineIntrinsics, false); // Making it true breaks java.lang.Math
2510+
define_pd_global(bool, PreferInterpreterNativeStubs, false);
2511+
define_pd_global(bool, ProfileTraps, false);
2512+
define_pd_global(bool, UseOnStackReplacement, true );
2513+
diff --git a/src/hotspot/cpu/arm/c2_globals_arm.hpp b/src/hotspot/cpu/arm/c2_globals_arm.hpp
2514+
index 57ed8f11c..02476a05b 100644
2515+
--- a/src/hotspot/cpu/arm/c2_globals_arm.hpp
2516+
+++ b/src/hotspot/cpu/arm/c2_globals_arm.hpp
2517+
@@ -34,7 +34,7 @@
2518+
2519+
define_pd_global(bool, BackgroundCompilation, true);
2520+
define_pd_global(bool, CICompileOSR, true);
2521+
-define_pd_global(bool, InlineIntrinsics, true);
2522+
+define_pd_global(bool, InlineIntrinsics, false); // Making it true breaks java.lang.Math
2523+
define_pd_global(bool, PreferInterpreterNativeStubs, false);
2524+
define_pd_global(bool, ProfileTraps, true);
2525+
define_pd_global(bool, UseOnStackReplacement, true);
2526+

0 commit comments

Comments
 (0)