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

Hamlin Li mli at openjdk.org
Tue Nov 18 17:06:51 UTC 2025


On Thu, 13 Nov 2025 07:12:38 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:
> 
>   modify stub_id name

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

> 2674:     // Compute #rounds for AES based on the length of the key array
> 2675:     __ lwu(keylen, Address(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT)));
> 2676:     __ mv(t0, 52);

what's this `52`? I see it also in `generate_aescrypt_encryptBlock`, do they mean similar things?
Can you add some comment about it? and give a name rather than use the magic number.

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

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


More information about the hotspot-compiler-dev mailing list