RFR: 8319716: RISC-V: Add SHA-2 [v10]

Fei Yang fyang at openjdk.org
Thu Jan 4 03:25:27 UTC 2024


On Fri, 22 Dec 2023 14:10:13 GMT, Robbin Ehn <rehn 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.
>
> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixed lmul

src/hotspot/cpu/riscv/vm_version_riscv.cpp line 169:

> 167:     if (UseRVV) {
> 168:       if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) {
> 169:         FLAG_SET_DEFAULT(UseSHA256Intrinsics, true);

As the code comment in shared code indicates, there should be a dependency between these flags and `UseSHA`. But seems we are still lacking the necessary logic for that and `UseSHA` is always false [2]. We might need similar handling like our aarch64 counterpart [3].

[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/globals.hpp#L342
[2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/vm_version_riscv.cpp#L151
[3] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp#L323-L376

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16562#discussion_r1441242041


More information about the hotspot-dev mailing list