RFR: 8360558: Use hex literals instead of decimal literals in math intrinsic constants

Kim Barrett kbarrett at openjdk.org
Tue Sep 30 22:33:44 UTC 2025


On Tue, 30 Sep 2025 21:49:19 GMT, Mohamed Issa <missa at openjdk.org> wrote:

>> I was surprised to discover that the "L" suffix is used quite a lot. I think those are likely often mistakes.
>
> So, we could have just used "U" suffix to guarantee 32-bit unsigned integer types because 32-bit platforms are no longer supported in OpenJDK?

32-bit platforms aren't gone yet. But that isn't the problem. The problem is that on 64-bit platforms the
L and UL suffix mean different things depending on the platform.  So yes, I think U without the length suffix
would have been better.  Not sure it's worth fixing at the moment; these all look harmless. And there might
be a future effort to do a thorough scrubbing in this area. It turns out there are *lots* of these.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27497#discussion_r2392971157


More information about the hotspot-compiler-dev mailing list