RFR: 8309502: RISC-V: String.indexOf intrinsic may produce misaligned memory loads [v4]
Vladimir Kempik
vkempik at openjdk.org
Thu Jun 8 12:24:55 UTC 2023
On Thu, 8 Jun 2023 08:32:31 GMT, Andrew Haley <aph at openjdk.org> wrote:
> I am very concerned about the increased complexity and maintenance burden caused by these unaligned access patches. While RISC-V is not a mainstream arch at this time, it may become one, and it that happens we'll need something reasonably maintainable. Sprinkling '`if (AvoidUnalignedAccesses)`' all over the back end is disastrous for readability. I urge you to find a more abstract solution, for example by creating a memory access assembler class and subclassing it as appropriate with aligned and unaligned versions.
Hello, do you mean things like load_XXXX_misaligned ( e.g. https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L1735 ) or more complicated things ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14320#issuecomment-1582483023
More information about the hotspot-compiler-dev
mailing list