-
Notifications
You must be signed in to change notification settings - Fork 50
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
base: master
Are you sure you want to change the base?
Conversation
auto a = loadBignum256(aOffset); | ||
auto b = loadBignum256(bOffset); | ||
auto mod = loadBignum256(modOffset); | ||
auto ret = mod != 0 ? ((uint512{a} * uint512{b}) % uint512{mod}).lo : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This above logic is from evmone: https://github.com/chfast/evmone/blob/master/lib/evmone/execution.cpp#L121
{ | ||
uint8_t data[32]; | ||
loadMemory(srcOffset, data, 32); | ||
// FIXME: change this to little endian? |
There was a problem hiding this comment.
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 Report
@@ 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 |
This pull request introduces 2 alerts when merging c05fc70 into f585c6e - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 8940fd0 into 523f42c - view on LGTM.com new alerts:
Comment posted by LGTM.com |
Need to add support to binaryen. |
This pull request introduces 4 alerts when merging 0e32bbf into 01c20c7 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 0e32bbf into a772faf - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 3c3c289 into 98944df - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 8f0538c into 98944df - view on LGTM.com new alerts:
|
Closes #526.