RFR: 8334999: RISC-V: implement AES single block encryption/decryption intrinsics [v8]
Arseny Bochkarev
duke at openjdk.org
Mon Oct 21 14:41:58 UTC 2024
On Sun, 20 Oct 2024 04:44:01 GMT, Yanhong Zhu <yzhu at openjdk.org> wrote:
>> Arseny Bochkarev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use same keys for encryption and decryption
>
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2279:
>
>> 2277: }
>> 2278:
>> 2279: void generate_aes_loadkeys(const Register &key, VectorRegister *working_vregs, int reg_number) {
>
> Hi, maybe `rounds` is more readable than `reg_number` here.
Renamed
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2289:
>
>> 2287:
>> 2288: void generate_aes_encrypt(const VectorRegister &res, VectorRegister *working_vregs, int reg_number) {
>> 2289: assert(reg_number <= 15, "reg_number should be less than or equal to working_vregs size")
>
> This lacks `;` at the end of statement, which is causing the GHA failure.
Fixed, thanks!
> src/hotspot/share/opto/library_call.cpp line 7225:
>
>> 7223: //------------------------------get_key_start_from_aescrypt_object-----------------------
>> 7224: Node * LibraryCallKit::get_key_start_from_aescrypt_object(Node *aescrypt_object) {
>> 7225: #if defined(PPC64) || defined(S390) || defined(RISCV)
>
> Hi, I think RISCV64 is more specific here for now.
Done!
> src/hotspot/share/opto/library_call.cpp line 7230:
>
>> 7228: // However, ppc64 vncipher processes MixColumns and requires the same round keys with encryption.
>> 7229: // The ppc64 stubs of encryption and decryption use the same round keys (sessionK[0]).
>> 7230: // The RISC-V stubs of encryption and decryption use the same round keys (sessionK[0]).
>
> `// The ppc64 and riscv64 stubs...` would be better.
Done
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1808954921
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1808955133
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1808955095
PR Review Comment: https://git.openjdk.org/jdk/pull/19960#discussion_r1808955186
More information about the hotspot-dev
mailing list