RFR: 8344880: AArch64: Add compile time check for class offsets

Andrew Haley aph at openjdk.org
Fri Dec 13 10:27:39 UTC 2024


On Thu, 12 Dec 2024 18:47:53 GMT, Chad Rakoczy <duke at openjdk.org> wrote:

> I think all immediate offsets should be safe (constant or non-constant) and this addresses the constants.

We should not do this. In the overwhelming majority of cases a maintainer does not (and should not have to) care whether an address will fit in an immediate or not. It is purely an encoding issue, not a semantic one, and should be handled internally by the assembler.

If instead of this PR we were to use some variant of `form_address()` on register+offset addresses, we wouldn't need to care about whether the offsets were compile-time constants or not, we wouldn't need this extra code, and  the result would be easier to read and maintain.

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

PR Comment: https://git.openjdk.org/jdk/pull/22623#issuecomment-2541107157


More information about the shenandoah-dev mailing list