RFR: 8377554: Load card table base and other values via AOTRuntimeConstants in AOT code [v3]

Ashutosh Mehra asmehra at openjdk.org
Tue Feb 24 16:33:09 UTC 2026


On Tue, 24 Feb 2026 11:15:03 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> Generated stubs and nmethods embed some runtime-derived constants, such as the card table base, directly into code as instruction operands. AOT code generation cannot rely on these constants being valid between the assembly run and a production run and adjusting the constants at load time is not currently supported. So, instead AOT generation must employ code which loads the constants from a table whose address can be relocated at load time.
>
> Andrew Dinn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   more VNKozlov feedback

Looks good, just a couple of comments.

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp line 272:

> 270: }
> 271: 
> 272: // return a register that differs from reg1, reg2, reg3 and is not rcx

I think the comment needs to be updated to mention `reg4` and remove reference to `rcx`.

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp line 308:

> 306:     __ shrptr(save);
> 307:     __ pop(rcx);
> 308:     __ mov(tmp1, save);

Is this `mov` redundant? `tmp1` value is not used after this.

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

PR Review: https://git.openjdk.org/jdk/pull/29884#pullrequestreview-3849103335
PR Review Comment: https://git.openjdk.org/jdk/pull/29884#discussion_r2848223711
PR Review Comment: https://git.openjdk.org/jdk/pull/29884#discussion_r2848224528


More information about the hotspot-dev mailing list