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

Quan Anh Mai qamai at openjdk.org
Wed Feb 21 13:48:55 UTC 2024


On Wed, 21 Feb 2024 11:12:27 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> I think the point is to reflow this into the series of ifs:
>> 
>> 
>> char* result = nullptr;
>> if (optimize_for_zero_base) {
>>    result = ...
>> }
>> 
>> if (result == nullptr) {
>>    result = ...
>> }
>> 
>> 
>> Probably good for future maintenance if we want to add more cases in this block.
>
> Ah okay. But that's wrong, since for the optimize_for_zero_base case, we would search the low address regions twice.

Why do you need to whole space to lie between 0 and 4G then, it seems you only want to have the base being < 4G, then the top of the klass space can be upto size + 4G

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

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


More information about the hotspot-dev mailing list