RFR: 8368724: RISC-V: Check if unaligned_access is enabled before use

Hamlin Li mli at openjdk.org
Fri Sep 26 08:33:25 UTC 2025


On Fri, 26 Sep 2025 03:36:50 GMT, Anjian Wen <wenanjian at openjdk.org> wrote:

> we can notice that the `unaligned_access.value()` can only be used when the `unaligned_access.enabled()` is true, so we add the check here before use
> 
> Manually checked the result on platforms w/wo fast misaligned accesses by running: $java -XX:+PrintFlagsFinal -version | grep AvoidUnalignedAccess

I think we're going to remove the `AvoidUnalignedAccesses`? And if `unaligned_access` is not enabled, then its value can not be `MISALIGNED_FAST`?
If both above are true, then seems this check is not necessary?

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

PR Comment: https://git.openjdk.org/jdk/pull/27510#issuecomment-3337362224


More information about the hotspot-dev mailing list