RFR: 8316592: RISC-V: implement poly1305 intrinsic [v7]
ArsenyBochkarev
duke at openjdk.org
Tue Nov 7 14:54:54 UTC 2023
On Mon, 6 Nov 2023 17:14:10 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> ArsenyBochkarev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Move wide_madd and wide_mul to macroAssembler_riscv
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 2053:
>
>> 2051: // Multiply and multiply-accumulate unsigned 64-bit registers.
>> 2052: void MacroAssembler::wide_mul(Register prod_lo, Register prod_hi, Register n, Register m) {
>> 2053: mul(prod_lo, n, m);
>
> Do we need to make sure differencs between registers via `assert_different_registers` at the entry of the method? for example,
> 1. prod_lo and prod_hi
> 2. prod_lo and (n, m)
Added some check that are not provided in `cad` and `adc`.
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 4549:
>
>> 4547:
>> 4548: // Recycle registers S_0, S_1, S_2
>> 4549: regs = (regs.remaining() + S_0 + S_1 + S_2).begin();
>
> I'm not quite sure if we need to recycle regisgters here.
> Could you explain the reason? Or can we remove the recycling code here, and allocate the regsters before the loop?
Actually such recycling is unnecessary at all so I removed it, thanks!
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 4573:
>
>> 4571:
>> 4572: // Further reduce modulo 2^130 - 5
>> 4573: __ srli(t1, U_2, 2);
>
> The 2 reduce (L4559-4564) and (L4573-4578) are doing the same thing, can we extract the duplicated code to a method (e.g. named `reduce`)? this will simplfy the code and help understanding.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16417#discussion_r1385044822
PR Review Comment: https://git.openjdk.org/jdk/pull/16417#discussion_r1385045953
PR Review Comment: https://git.openjdk.org/jdk/pull/16417#discussion_r1385044753
More information about the hotspot-compiler-dev
mailing list