Skip to content

Comments

Use int32_of_big_int when computing bignum limbs#2682

Merged
mergify[bot] merged 1 commit intomasterfrom
gabor/limb
Jul 27, 2021
Merged

Use int32_of_big_int when computing bignum limbs#2682
mergify[bot] merged 1 commit intomasterfrom
gabor/limb

Conversation

@ggreif
Copy link
Contributor

@ggreif ggreif commented Jul 27, 2021

I suspect this will also resolve potential problems with trapping on 32-bit compilation platforms. I don't think it is related to #2671, but who knows?

I suspect this will also resolve potential problems with trapping on 32-bit compilation platforms. I don't think it is related to #2671, but who knows?
@dfinity-ci
Copy link

This PR does not affect the produced WebAssembly code.

@@ -2497,7 +2497,7 @@ module BigNumLibtommath : BigNumType = struct
then []
else
let (a, b) = Big_int.quomod_big_int n twoto28 in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why it's 28 bit here?

Copy link
Contributor Author

@ggreif ggreif Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nomeata is this some MP/LibTomMath thing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think the internal representation of libtommath bigints uses 28 bit limbs

@ggreif ggreif added the automerge-squash When ready, merge (using squash) label Jul 27, 2021
@mergify mergify bot merged commit bed10ca into master Jul 27, 2021
@mergify mergify bot deleted the gabor/limb branch July 27, 2021 15:32
@mergify mergify bot removed the automerge-squash When ready, merge (using squash) label Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants