RFR: 8344880: AArch64: Add compile time check for class offsets
Andrew Haley
aph at openjdk.org
Thu Dec 12 18:52:09 UTC 2024
On Fri, 6 Dec 2024 23:57:41 GMT, Chad Rakoczy <duke at openjdk.org> wrote:
> [JDK-8344880](https://bugs.openjdk.org/browse/JDK-8344880)
>
> Adds compile time checks for str/ldr instructions to verify that the immediate offset will fit. This adds static_assert for constant offsets that are checked at compile time. The macro offset_of is not constexpr so instead the class size is checked. If the size of a class fits into a memory instructions then any offset in it will fit.
Perhaps I'm missing something here, but isn't the main problem immediate offsets that are not constant when HotSpot itself is compiled by a C++ compiler? Or is your intention to find all the uses of offsetted immediate that are non-constant?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22623#issuecomment-2535455202
More information about the shenandoah-dev
mailing list