RFR: 8322195: RISC-V: Minor improvement of MD5 instrinsic

Fei Yang fyang at openjdk.org
Mon Dec 18 07:46:41 UTC 2023


On Fri, 15 Dec 2023 14:40:59 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Hi,
> Can you review this minor patch to improve MD5 instrinsic?
> Thanks!
> 
> ## Test
> 
> tests (`find test/ -iname "*md5*.java"`) passed.

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 the lower half of `state` is needed? 

[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp#L4170

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17123#discussion_r1429607831


More information about the hotspot-compiler-dev mailing list