RFR: 8374351: RISC-V: Small refactoring for crypto macro-assembler routines

Fei Yang fyang at openjdk.org
Fri Dec 26 02:46:57 UTC 2025


On Thu, 25 Dec 2025 06:11:51 GMT, Anjian Wen <wenanjian at openjdk.org> wrote:

> This patch is mainly for readability and subsequent GCM call requirements.
> 
> 1. Extract the ghash function to facilitate subsequent calls during the implementation of aes-gcm 
> 2. Unify the prefixes of function names for aes intrinsic-related functions. Only use generate prefix for the main intrinsic function, delete the other functions `generate_` prefix

Seems fine. One minor comment.

src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 3059:

> 3057:     VectorRegister vtmp3 = v3;
> 3058: 
> 3059:     ghash_loop(subkeyH, state, data, blocks, vtmp1, vtmp2, vtmp3);

`state` is the first param for `generate_ghash_processBlocks`. Can we simply swap the first two params to keep that order?

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

PR Review: https://git.openjdk.org/jdk/pull/28988#pullrequestreview-3612652571
PR Review Comment: https://git.openjdk.org/jdk/pull/28988#discussion_r2647421422


More information about the hotspot-compiler-dev mailing list