On Fri, 22 May 2026 13:06:15 GMT, Ferenc Rakoczi <[email protected]> wrote:

>> There is certainly the possibility of this happening. Most subtypes employ a 
>> hard-wired non-zero limb count but the constructor for 
>> `IntegerPolynomialModBinP` accepts a limb count argument which could 
>> certainly be passed as zero -- with zero length arrays then being employed 
>> for the limb data (obviously a negative count won't cut it). I'm not clear 
>> whether that would trip over other assumptions before a mult call could 
>> occur but it costs little to defend against the possibility that it might 
>> not so probably best to be safe?
>
> This intrinsic is for such a subtype that has a limb count of 5, so 0 is not 
> possible here.

I believe the method being intrinsified here is the one on the generic class 
i.e. `IntegerPolynomial::conditionalAssign(int set, long[] a, long[] b)`. So, 
in theory, it could be called from any subclass of `IntegerPolynomial`, not 
just for `IntegerPolynomialP256`. Can you provide a more detailed explanation 
of why it won't be called from other subtypes, including types where the number 
of limbs may be 0?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30941#discussion_r3413473103

Reply via email to