RFR: 8291550: RISC-V: jdk uses misaligned memory access when AvoidUnalignedAccess enabled [v11]

Vladimir Kempik vkempik at openjdk.org
Thu May 11 13:24:52 UTC 2023


On Thu, 11 May 2023 07:16:10 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Vladimir Kempik has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 18 commits:
>> 
>>  - Merge branch 'master' into LAM_SAM
>>  - merge
>>  - Add strig_equals patch to prevent misaligned access there
>>  - rename helper function, add assertion
>>  - Move misaligned lwu into macroAssembler_riscv.cpp
>>  - simplify sipush and branch
>>  - simpify branching in branch opcodes
>>  - Remove unused macros
>>  - spaces
>>  - fix nits
>>  - ... and 8 more: https://git.openjdk.org/jdk/compare/4aa65cbe...0c5ab1c6
>
> src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp line 1112:
> 
>> 1110:       __ lhu(t0, Address(t, 6));
>> 1111:       __ slli(t0, t0, 48);
>> 1112:       __ add(t1, t1, t0);
> 
> Maybe another `load_long_misaligned` assembler function for this long sequence?

yeah, there is one small issue with that, loading granularity, here it's two, I will have to make universal "load_long_misaligned" and pass load granularity to it. Still could be useful in future tho

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13645#discussion_r1191177426


More information about the hotspot-dev mailing list