RFR: 8361892: AArch64: Incorrect matching rule leading to improper oop instruction encoding [v2]

Andrew Dinn adinn at openjdk.org
Tue Jul 15 11:23:39 UTC 2025


On Tue, 15 Jul 2025 08:19:59 GMT, Andrew Haley <aph at openjdk.org> wrote:

> It says "Do not use ExternalAddress to load 'byte_map_base'" but then uses ExternalAddress. I'm baffled...

You need to read it as a FIXME ;-)

The current workaround that we have prototyped is to place the base 'address' in a field in the global AOTRuntimeConstants instance and load it via that field. That's not very attractive because we need to do an indirect load from an lea'd constant address (movz/movk/movk/ldr) at every occurrence of a GC barrier. We also need to relocate every mov sequence when we load the code from the archive.

What we would like longer term is to store the address in a method/stub's constants section and use a pc-relative load to access it. We would need to provide the constant entry with a relocation so we can reinit it to the VM's current base at AOT code load but we can use the same constant for every occurrence of the barrier. That also means we update less pages during reloc which means we should eventually be able to rely on mmaping AOT cocde cache pages with limited copy on write for reloced insns.

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

PR Comment: https://git.openjdk.org/jdk/pull/26249#issuecomment-3073218378


More information about the hotspot-compiler-dev mailing list