RFR: 8319716: RISC-V: Add SHA-2
Robbin Ehn
rehn at openjdk.org
Tue Nov 14 10:44:30 UTC 2023
On Tue, 14 Nov 2023 08:12:57 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Hi, please consider.
>>
>> Main author is @luhenry, I only fixed some minor things and tested it.
>>
>> Such as:
>> test/hotspot/jtreg/compiler/intrinsics/sha/
>> test/jdk/java/security/MessageDigest/
>> test/jdk/jdk/security/
>> tier1
>>
>> And still running some test.
>
> src/hotspot/cpu/riscv/vm_version_riscv.cpp line 160:
>
>> 158: }
>> 159:
>> 160: if (UseZvknha && UseZvkb) {
>
> A simple question here: Does the existence of `Zvknhb` also means availability of `Zvknha`? Or should this be something like `if ((UseZvknha || UseZvknhb) && UseZvkb)`?
It seems like the correct answer is:
`• Zvknhb supports SHA-256 and SHA-512.`
I suggest we start with supporting Zvkn, which is:
Zvkned, Zvknhb, Zvkb, Zvkt
They require: Zve64x
If someone have a CPU lacking something we can revisit it.
(I *think* Zvknha is mainly for 32-bits, as it only require sew 32)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16562#discussion_r1392369153
More information about the hotspot-dev
mailing list