RFR: 8316592: RISC-V: implement poly1305 intrinsic [v7]

Hamlin Li mli at openjdk.org
Fri Nov 10 11:37:05 UTC 2023


On Fri, 10 Nov 2023 10:12:26 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> I think the caller does a full mod N reduction of your result in `IntegerPolynomial::final Reduce()`.
>
>> Thanks for the information @theRealAph Seems the finalReduce in java code does not make reduce in intrinsic code here unnecessary, because in the intrinsic code, we only store back 130 bits back to acc_start,
> 
> That is not true. We write 131 bits back:
> 
> 
>     __ ubfx(rscratch1, U_1, 40, 24);   // Top 24 bits of U1
>     __ bfi(rscratch1, U_2, 24, 3);    // Bottom 3 bits of U2
>     __ str(rscratch1, Address(acc_start, 4 * sizeof (jlong)));

@theRealAph one more question for you (asked above among others), hope it's the last one :)

2. `wide_mul(U_1, U_1HI, S_0, R_1);  wide_madd(U_1, U_1HI, S_1, R_0);  wide_madd(U_1, U_1HI, S_2, RR_1);` in L7178 at stubGenerator_aarch64.cpp, why S_2*RR_1 does not consider the low 2 bit of R_1, but just the higher bits (which in RR_1)?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16417#discussion_r1389285081


More information about the hotspot-compiler-dev mailing list