RFR: 8310268: RISC-V: misaligned memory access in String.Compare intrinsic [v3]
Vladimir Kempik
vkempik at openjdk.org
Mon Jul 24 09:59:16 UTC 2023
On Mon, 24 Jul 2023 05:54:43 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Vladimir Kempik has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Simplify case for long LU UL compares
>
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2315:
>
>> 2313: void compare_string_8_x_LU(Register tmpL, Register tmpU, Register strL, Register strU, Label& DIFF) {
>> 2314: const Register tmp = x30;
>> 2315: __ ld(tmpL, Address(strL));
>
> Could we make use of another tmp register (maybe `x7`) and use that as the destination register for `ld` instead? Then we could inflate_lo32/hi32 from this tmp register and put the result in `tmpL`. That way would help remove the two `mv` instructions here in this function and the one located at label `DIFF`.
I have done it in a slightly different way, still removing all "mv"s you have mentioned
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14534#discussion_r1272022286
More information about the hotspot-dev
mailing list