Fix x64 gmp init on platforms that define UL as 32 bits. #9
pull evoskuil wants to merge 1 commits into bitcoin-core:master from evoskuil:master changing 1 files +1 −1-
evoskuil commented at 9:16 am on April 26, 2014: contributor
-
evoskuil renamed this:
Fix x64 gmp initialization on platforms that defined UL as 32 bits.
Fix x64 gmp init on platforms that defined UL as 32 bits.
on Apr 26, 2014 -
evoskuil renamed this:
Fix x64 gmp init on platforms that defined UL as 32 bits.
Fix x64 gmp init on platforms that define UL as 32 bits.
on Apr 26, 2014 -
in src/field_gmp_impl.h: in 99832a3c4e outdated
17@@ -18,7 +18,7 @@ void static secp256k1_fe_inner_start(void) { 18 for (int i=0; i<(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; i++) 19 secp256k1_field_pc[i] = 0; 20 secp256k1_field_pc[0] += 0x3D1UL; 21- secp256k1_field_pc[32/GMP_NUMB_BITS] += (1UL << (32 % GMP_NUMB_BITS)); 22+ secp256k1_field_pc[32/GMP_NUMB_BITS] += (1ULL << (32 % GMP_NUMB_BITS));
sipa commented at 10:02 am on April 29, 2014:How about ((mp_limb_t)1) « (32 % GMP_NUMB_BITS) ?
evoskuil commented at 6:33 pm on April 29, 2014:Sure, that works too.genjix commented at 6:20 am on May 7, 2014: nonecan this pull request be closed?Fix x64 gmp init on platforms that define UL as 32 bits. ac274bff23evoskuil commented at 5:34 pm on May 8, 2014: contributorYes, the resulting value is incorrect in a 64 bit build iflong
is defined as 32 bits (as in msvc), causing all tests to fail. With this change (either technique) all tests pass.sipa merged this on May 8, 2014sipa closed this on May 8, 2014
sipa referenced this in commit a797ceffdf on May 8, 2014
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-23 07:15 UTC
This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-23 07:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me