On Wed, 19 Aug 2026 05:48:18 GMT, Shawn Emery <[email protected]> wrote:

>> Ok, yes, this has probably grown enough to merit a refactor. But do we want 
>> another subroutine with > 25 arguments? (we already have that with 
>> `keccak_round_gpr`).
>> 
>> Perhaps a cleaner way to do this would be to manage the register set a0-a24 
>> here and in the other client of `keccak_round_gpr` using an array:
>> 
>> Register[25] a = {
>>     r25, r26, r27, r3, r4,
>>     . . .
>>     r20, r21, r22, r23, r24,
>> };
>> 
>> 
>> That allows us to use `a[0]`, `a[1]` etc to access what is now written as 
>> `a0`, `a1` etc. It also means the subroutines only take one `Register[25]` 
>> argument in place of 25 `Register` arguments and can rely on indexing and 
>> looping.
>
> Thank you for noticing this pattern.  Done!

This is much better and I note that you propagated use of the register array to 
`keccak_round_gpr` and `generate_sha3_implCompress_gpr`the SHA3 routine. 
However, in that latter routine you missed a second opportunity to use a 
register set `push` for the register saves (at line 9067).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32049#discussion_r3811384357

Reply via email to