RFR: 8334999: RISC-V: implement AES single block encryption/decryption intrinsics [v2]
Ludovic Henry
luhenry at openjdk.org
Mon Jul 8 13:06:35 UTC 2024
On Sun, 7 Jul 2024 15:16:02 GMT, ArsenyBochkarev <duke at openjdk.org> wrote:
>> Hello everyone! Please review this port of vector AES single block encryption/decryption intrinsics. On my QEMU with `Zvkned` extension enabled the `test/hotspot/jtreg/compiler/codegen/aes/TestAESMain.java` test is OK. I know that currently hardware implementing this extension is not available on the market but I suppose this PR can be a good starting point on supporting AES intrinsics for RISC-V in OpenJDK.
>
> ArsenyBochkarev has updated the pull request incrementally with three additional commits since the last revision:
>
> - Use t2 directly instead of temp2
> - Rename temp1 -> x0
> - Left a note on a side effect of generate_vle32_pack4
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2360:
> 2358: generate_aescrypt_round(res, vzero, vtmp1, vtmp2, vtmp3, vtmp4);
> 2359:
> 2360: generate_vle32_pack2(key, vtmp1, vtmp2);
Could you add the comment for `key` here as well.
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2370:
> 2368: __ vaesem_vv(res, vzero);
> 2369:
> 2370: generate_vle32_pack2(key, vtmp1, vtmp2);
And here as well for `key`.
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2380:
> 2378: __ vaesem_vv(res, vzero);
> 2379:
> 2380: generate_vle32_pack2(key, vtmp1, vtmp2);
Here as well for `key`.
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2465:
> 2463: generate_aesdecrypt_round(res, vzero, vtmp1, vtmp2, vtmp3, vtmp4);
> 2464:
> 2465: generate_vle32_pack2(key, vtmp1, vtmp2);
Same here for `key`.
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2476:
> 2474: __ vaesdm_vv(res, vzero);
> 2475:
> 2476: generate_vle32_pack2(key, vtmp1, vtmp2);
Same here for `key`.
src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2487:
> 2485: __ vaesdm_vv(res, vzero);
> 2486:
> 2487: generate_vle32_pack2(key, vtmp1, vtmp2);
Same here for `key`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1668308026
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1668308210
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1668308458
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1668308689
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1668308755
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1668308837
More information about the hotspot-dev
mailing list