RFR: 8363837: Move StubRoutines::_crc_table_adr initialization to preuniverse stubs

Andrew Dinn adinn at openjdk.org
Wed Jul 23 15:45:57 UTC 2025


On Wed, 23 Jul 2025 15:04:07 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> Another solution would be to have separate StubRoutines::get_crc_table_addr() which can be use early by AOT code and later by generate_initial_stubs(). It will check local value (StubRoutines::x86::_crc32c_table on x86, for example) and calculate it if needed.

Yes, I think it would be much better if we removed the entry declarations for `crc_table_adr` and `crc32c_table_addr` from stubDeclarations.hpp and instead always looked up the address using a getter method declared in the shared header and implemented in each arch.

We don't need a generated field in class StubRoutines nor any way to track the value as we do for real generated addresses. So, using the declaration mechanism was the wrong way to do this.

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

PR Comment: https://git.openjdk.org/jdk/pull/26434#issuecomment-3109177274


More information about the graal-dev mailing list