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

Robbin Ehn rehn at openjdk.org
Fri Dec 22 13:39:57 UTC 2023


On Fri, 22 Dec 2023 12:48:07 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> I suppose we would need some more if conditions to distinguish the register usage for the sha512 case in places like indexed load/store, message block load, etc. Because we will work with vector register pairs as indicated by `m2` for this case. I am not sure if that's a good way.
>
> Is it possible to just use one pieice of code to work for both sha-256/sha-512? I mean without conditions everywhere. As the difference between 256/512 is just some contants and rounds number.

Yes, we can't use v10 and v11, as there is only two alternative.
vlen=128 we need to use two registers, and vlen>=256 we need one.
Simple issue, fixed. (not passed all testing yet, but :) )

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

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


More information about the hotspot-dev mailing list