On Thu, 4 Jun 2026 15:45:29 GMT, Andrew Haley <[email protected]> wrote:
>> src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp line 259: >> >>> 257: >>> https://www.researchgate.net/publication/2683298_A_Collection_of_Selected_Pseudorandom_Number_Generators_With_Linear_Structures >>> */ >>> 258: mov_slow(temp, 69069); >>> 259: mul(state, state, temp); >> >> `+1` is missing in this LGC? AArch64 has it. > > You're right. Entacher allows either. The disadvantage of eliding `+1` is > that if (because of some unknown bug) `state` should ever become zero, it'll > be zero forever. To the best of my knowledge this never happens,so adding 1 > is a defence-in-depth thing. I'd appreciate your opinion on this. I think defense in depth is good here, I do not like surprises showing up accidentally in production. So let's add `+1` to LCGs everywhere, starting from here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28541#discussion_r3360896526
