On Thu, 21 May 2026 08:51:14 GMT, Andrew Dinn <[email protected]> wrote:
>> I think x86 has an explicit test for `length == 0`: >> https://github.com/openjdk/jdk/blob/6fb07f9b26bcd23f622a50c6ca5f23363b432f85/src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp#L740-L742 > > 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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30941#discussion_r3288553610
