RFR: 8365732: RISC-V: implement AES CTR intrinsics [v26]
Hamlin Li
mli at openjdk.org
Tue Nov 18 15:21:15 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
Hey, have brief look, and some minor comments first.
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2700:
> 2698: }
> 2699:
> 2700: void counterMode_AESCrypt(int round, Register in, Register out, Register key, Register counter,
Maybe move this `counterMode_AESCrypt` above `generate_counterMode_AESCrypt`?
src/hotspot/cpu/riscv/vm_version_riscv.cpp line 447:
> 445: FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
> 446: }
> 447: }
Suggestion:
if (FLAG_IS_DEFAULT(UseAESCTRIntrinsics) && UseZbb) {
FLAG_SET_DEFAULT(UseAESCTRIntrinsics, true);
}
if (UseAESCTRIntrinsics && !UseZbb) {
warning("Cannot enable UseAESCTRIntrinsics on cpu without UseZbb support.");
FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
}
src/hotspot/cpu/riscv/vm_version_riscv.cpp line 458:
> 456: }
> 457: if (UseAESCTRIntrinsics) {
> 458: warning("AES/CTR intrinsics are not available on this CPU");
Suggestion:
warning("Cannot enable UseAESCTRIntrinsics on cpu without UseZvkn support.");
-------------
PR Review: https://git.openjdk.org/jdk/pull/25281#pullrequestreview-3478352645
PR Review Comment: https://git.openjdk.org/jdk/pull/25281#discussion_r2538607124
PR Review Comment: https://git.openjdk.org/jdk/pull/25281#discussion_r2538595480
PR Review Comment: https://git.openjdk.org/jdk/pull/25281#discussion_r2538602383
More information about the hotspot-compiler-dev
mailing list