RFR: 8371968: RISC-V: implement AES CBC intrinsics [v3]

Fei Yang fyang at openjdk.org
Mon Dec 8 01:25:06 UTC 2025


On Fri, 5 Dec 2025 03:24:31 GMT, Anjian Wen <wenanjian at openjdk.org> wrote:

>> Support AES CBC intrinsic on RISCV, Already passed the tests in
>> test/hotspot/jtreg/compiler/codegen/aes/
>> test/jdk/com/sun/crypto
>
> Anjian Wen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
> 
>  - Modify some assert
>  - RISC-V: implement AES CBC intrinsics

Thanks for the update. Two comments remain.

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

> 2673:       __ mv(x10, input_len);
> 2674:       __ leave();
> 2675:       __ ret();

Similar here. Consider introduce a subroutine to remove the duplicate code for the three cases.

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

> 2784:       __ mv(x10, input_len);
> 2785:       __ leave();
> 2786:       __ ret();

Since the three cases here duplicate most of the code, seems better to introduce subroutine to simply the code. I think that will be similar as what you do for the CTR AES intrinsic where we have this subroutine `counterMode_AESCrypt` which is called by `generate_counterMode_AESCrypt`.

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

PR Review: https://git.openjdk.org/jdk/pull/28320#pullrequestreview-3549811847
PR Review Comment: https://git.openjdk.org/jdk/pull/28320#discussion_r2596785380
PR Review Comment: https://git.openjdk.org/jdk/pull/28320#discussion_r2596784081


More information about the hotspot-compiler-dev mailing list