RFR: 8377172: Change datatype of CodeEntryAlignment to uint [v2]

Leo Korinth lkorinth at openjdk.org
Tue Feb 10 13:13:23 UTC 2026


On Tue, 10 Feb 2026 11:21:53 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

>> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   remove range
>
> src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp line 244:
> 
>> 242:   }
>> 243: 
>> 244:   if (checked_cast<uintx>(OptoLoopAlignment) > CodeEntryAlignment) {
> 
> Why not cast it all the way down to `uint` when you are already using a checked cast?

Both works, I could also cast to an `uint16_t` as well. The `uintx` cast does less narrowing, that is why I chose it.

Ideally  `OptoLoopAlignment` should be changed to a `uint` as well. But I need to stop somewhere. If it was not for the 32 bit world, I would not need to do the cast at all.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29637#discussion_r2787875904


More information about the hotspot-dev mailing list