Re:How hard can generating 1024-bit primes be?
by jcalvinowens on Sunday May 05, 2024 @12:49PM
(#40266231)
Very much disagree with your point about constraints. A bug existing in 10+ year old code that has never really been tested and run by four people doesn't support any point. In real life one actually checks these things, it's not that complex :)
Case in point: counting the f's in your constants took me longer than finding that constraint bug did. You would argue ULLONG_MAX would fix that, I suppose.
You're right, that's the 32-bit arm instruction, doh. In my defense, this code was written before 64-bit ARM existed!
As for the codegen on ARM, I don't think your asm implementation is correct there either. As far as I can tell the UMULL instruction only cares about the least significant 32 bits in the source registers, regardless if you're on a 64-bit CPU: https://developer.arm.com/documentation/ddi0602/2024-03/Base...