RFR: 8373069: RISC-V: implement GHASH intrinsic [v4]
Fei Yang
fyang at openjdk.org
Mon Dec 15 01:44:57 UTC 2025
On Thu, 11 Dec 2025 12:22:13 GMT, Anjian Wen <wenanjian at openjdk.org> wrote:
>> support GHASH intrinsic for crypt GCM, which need zvkg extension.
>>
>> passed the tests in
>> test/hotspot/jtreg/compiler/codegen/aes/
>> test/jdk/com/sun/crypto
>
> Anjian Wen has updated the pull request incrementally with one additional commit since the last revision:
>
> modify format
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 3021:
> 3019: assert(UseZvkg, "need GHASH instructions (Zvkg extension) support");
> 3020:
> 3021: __ align(CodeEntryAlignment);
Can you move this line to immediately before L3025? Like:
__ align(CodeEntryAlignment);
address start = __ pc();
__ enter();
Then it looks more obvious where we want to align the code. BTW: Seems CBC and CTR intrinsics need similar adjustment.
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 3052:
> 3050: __ vghsh_vv(partial_hash, hash_subkey, cipher_text);
> 3051: __ subi(blocks, blocks, 1);
> 3052: __ bnez(blocks, L_ghash_loop);
Please leave a new line after the loop.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28548#discussion_r2617702776
PR Review Comment: https://git.openjdk.org/jdk/pull/28548#discussion_r2617699025
More information about the hotspot-dev
mailing list