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

Support 128bit numbers #627

Merged
merged 26 commits into from
Jul 26, 2019
Merged

Support 128bit numbers #627

merged 26 commits into from
Jul 26, 2019

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Jul 7, 2019

@bjorn3
Copy link
Member Author

bjorn3 commented Jul 25, 2019

128bit multiplication is currently failing, because checked binops are not yet implemented for 64bit integers.

Note to self
llvm:

a: lo=353985398 hi=0
b: lo=932490 hi=0
result: lo=-1867753060 hi=0
n: lo=-1 hi=-1
d: lo=932490 hi=0
r: lo=1048575 hi=0
s: lo=-1 hi=-1
[..]

clif:

a: lo=353985398 hi=0
b: lo=932490 hi=0
result: lo=-1867753060 hi=0
n: lo=-1 hi=-1
d: lo=932490 hi=0
r: lo=1048575 hi=0
s: lo=-1 hi=-1
d & s as $ty: lo=932490 hi=0

Edit: #646 implemented checked binops, making 128bit multiplication succeed 🎉

@bjorn3 bjorn3 added the S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. label Jul 26, 2019
@bjorn3 bjorn3 changed the title [WIP] Support 128bit numbers Support 128bit numbers Jul 26, 2019
@bjorn3
Copy link
Member Author

bjorn3 commented Jul 26, 2019

Switched to use my own fork of cranelift. This means that we don't have to wait for bytecodealliance/cranelift#795 to land.

@bjorn3
Copy link
Member Author

bjorn3 commented Jul 26, 2019

Going to merge this, as it blocks compilation of many crates.

@bjorn3 bjorn3 merged commit a302f88 into master Jul 26, 2019
@bjorn3 bjorn3 deleted the wip_i128 branch July 26, 2019 10:19
bjorn3 added a commit that referenced this pull request Jul 26, 2019
These parts are no longer necessary as of #627
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant