RFR: 8322195: RISC-V: Minor improvement of MD5 instrinsic [v2]
Hamlin Li
mli at openjdk.org
Mon Dec 18 11:03:06 UTC 2023
On Mon, 18 Dec 2023 07:43:49 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Hamlin Li has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - add space
>> - Add some comment
>
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 4165:
>
>> 4163: __ ld(state2, Address(state, 8));
>> 4164: __ srli(state3, state2, 32);
>> 4165: __ andr(state2, state2, t0);
>
> Better to add some code comment for this tweak. Or turn the four succeeding `mv` [1] into `addw` with `zr` to make it explicit that only the lower half of `state` is needed?
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp#L4170
Agree, added some comments.
I don't change `mv` to `addw`, as anyway it will be sign-extened to higher 32 bits, so maybe comment make it more clear.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17123#discussion_r1429928918
More information about the hotspot-compiler-dev
mailing list