RFR: 8365732: RISC-V: implement AES CTR intrinsics [v17]

Fei Yang fyang at openjdk.org
Fri Nov 7 04:14:04 UTC 2025


On Thu, 6 Nov 2025 11:06:24 GMT, Anjian Wen <wenanjian at openjdk.org> wrote:

>> Hi everyone, please help review this patch which Implement the _counterMode_AESCrypt with Zvkned. On my QEMU, with Zvkned extension enabled, the tests in test/hotspot/jtreg/compiler/codegen/aes/ Passed.
>
> Anjian Wen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix a jtreg problem

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

> 2759:     __ mv(t0, 52);
> 2760:     __ blt(keylen, t0, L_aes128_loop_next);
> 2761:     __ beq(keylen, t0, L_aes192_loop_next);

I think these branches in the loop could be saved if we do versioning according to keylen. Then we only need to do two branches on entry to choose the right version. And this also applies in the case of loadkeys.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25281#discussion_r2501613720


More information about the hotspot-compiler-dev mailing list