Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement bignum system library using intx #530

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Implement bignum system library using intx #530

wants to merge 3 commits into from

Conversation

axic
Copy link
Member

@axic axic commented Apr 26, 2019

Closes #526.

auto a = loadBignum256(aOffset);
auto b = loadBignum256(bOffset);
auto mod = loadBignum256(modOffset);
auto ret = mod != 0 ? ((uint512{a} * uint512{b}) % uint512{mod}).lo : 0;
Copy link
Member Author

Choose a reason for hiding this comment

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

{
uint8_t data[32];
loadMemory(srcOffset, data, 32);
// FIXME: change this to little endian?
Copy link
Member Author

Choose a reason for hiding this comment

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

intx only supports big endian right now: chfast/intx#78

@codecov-io
Copy link

codecov-io commented Apr 26, 2019

Codecov Report

Merging #530 into master will decrease coverage by 0.28%.
The diff coverage is 24.32%.

@@            Coverage Diff             @@
##           master     #530      +/-   ##
==========================================
- Coverage   71.41%   71.13%   -0.29%     
==========================================
  Files           9        9              
  Lines        1536     1573      +37     
  Branches      136      136              
==========================================
+ Hits         1097     1119      +22     
- Misses        411      426      +15     
  Partials       28       28

@lgtm-com
Copy link

lgtm-com bot commented Apr 30, 2019

This pull request introduces 2 alerts when merging c05fc70 into f585c6e - view on LGTM.com

new alerts:

  • 2 for FIXME comment

Comment posted by LGTM.com

@lgtm-com
Copy link

lgtm-com bot commented May 2, 2019

This pull request introduces 2 alerts when merging 8940fd0 into 523f42c - view on LGTM.com

new alerts:

  • 2 for FIXME comment

Comment posted by LGTM.com

@axic
Copy link
Member Author

axic commented May 15, 2019

Need to add support to binaryen.

@axic axic changed the base branch from hunter-intx to master May 22, 2019 23:24
@lgtm-com
Copy link

lgtm-com bot commented May 23, 2019

This pull request introduces 4 alerts when merging 0e32bbf into 01c20c7 - view on LGTM.com

new alerts:

  • 4 for FIXME comment

Comment posted by LGTM.com

@lgtm-com
Copy link

lgtm-com bot commented May 23, 2019

This pull request introduces 2 alerts when merging 0e32bbf into a772faf - view on LGTM.com

new alerts:

  • 2 for FIXME comment

Comment posted by LGTM.com

@lgtm-com
Copy link

lgtm-com bot commented May 28, 2019

This pull request introduces 2 alerts when merging 3c3c289 into 98944df - view on LGTM.com

new alerts:

  • 2 for FIXME comment

Comment posted by LGTM.com

@lgtm-com
Copy link

lgtm-com bot commented Jul 15, 2019

This pull request introduces 2 alerts when merging 8f0538c into 98944df - view on LGTM.com

new alerts:

  • 2 for FIXME comment

@axic axic marked this pull request as draft June 9, 2020 14:05
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.

Implement bignum system library (subset)
2 participants