RFR: 8377554: Load card table base and other values via AOTRuntimeConstants in AOT code
Andrew Dinn
adinn at openjdk.org
Tue Feb 24 10:00:15 UTC 2026
On Tue, 24 Feb 2026 09:57:20 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> src/hotspot/cpu/x86/gc/shared/cardTableBarrierSetAssembler_x86.cpp line 151:
>>
>>> 149: if (AOTCodeCache::is_on_for_dump()) {
>>> 150: __ movptr(rscratch, ExternalAddress(AOTRuntimeConstants::card_table_address()));
>>> 151: __ movq(rscratch, rscratch);
>>
>> So why do you need this `movq`? I saw you pushed it to fix some issue. What was wrong?
>
> AOTRuntimeConstants::card_table_address() returns the address of the field in the static AOTRuntimeConstants object where the card table address (byte_map_base) is stored. So,
>
> __ movptr(rscratch, ExternalAddress(AOTRuntimeConstants::card_table_address()));
>
> simply loads the address of that field into `rscratch`. We need to load via that address to obtain the actual card table address.
This also needs fixing in premain.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29884#discussion_r2845745056
More information about the hotspot-dev
mailing list