RFR: 8323497: On x64, use 32-bit immediate moves for narrow klass base if possible [v7]

Thomas Stuefe stuefe at openjdk.org
Fri May 23 08:26:38 UTC 2025


On Fri, 23 May 2025 08:15:33 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with four additional commits since the last revision:
>> 
>>  - also for encode_klass
>>  - fix test
>>  - back to unconditional 4g, but with better comment
>>  - feedback alexey
>
> src/hotspot/cpu/x86/compressedKlass_x86.cpp line 40:
> 
>> 38: 
>> 39:   // Unconditionally attempting to reserve in lower 4G first makes always sense:
>> 40:   // -CDS -COH: try to get unscaled mode (zero base zero shift)
> 
> Suggestion:
> 
>   // -CDS -COH: Try to get unscaled mode (zero base, zero shift)

Fixed

> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 5418:
> 
>> 5416:     shrq(r, CompressedKlassPointers::shift());
>> 5417:   }
>> 5418:   BLOCK_COMMENT("} encode_and_move_klass_not_null");
> 
> Copy-paste nit: this is still `encode_klass_not_null`.

Fixed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17340#discussion_r2104082273
PR Review Comment: https://git.openjdk.org/jdk/pull/17340#discussion_r2104080517


More information about the hotspot-dev mailing list