[lworld] RFR: 8367073: [lworld] Conform to JEP 450 encoding of mark word

Paul Hübner phubner at openjdk.org
Wed Oct 1 13:24:50 UTC 2025


On Wed, 1 Oct 2025 13:21:18 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> Hi all, 
>> 
>> This PR refactors the mark word to use the order of bits as specified in [JEP 450](https://openjdk.org/jeps/450). 
>> 
>> Specifically, there are three portions to this change:
>> - Moving the age bits lower to their intended position.
>> - Fixing a miscompilation in the native `hashCode` intrinsic that got unearthed as a result.
>> - Updating the documentation to be more inline with the mainline docs and minimal Valhalla additions.
>> 
>> Feedback is welcome, especially for the doc changes. If there are any ideas of other places in which similar miscompilations could occur, that would be valuable to know as well.
>
> src/hotspot/share/oops/markWord.hpp line 428:
> 
>> 426: 
>> 427:  private:
>> 428:   inline uintptr_t write_bits(uintptr_t input, uintptr_t val, uint start, uint end) const {
> 
> Where is this method used?

Good catch, it's left over from a prototype. Sorry about that, will remove.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1578#discussion_r2394564136


More information about the valhalla-dev mailing list