Add Compiler-RT for 128bit integer support#8313
Add Compiler-RT for 128bit integer support#8313jkthorne wants to merge 61 commits intocrystal-lang:masterfrom
Conversation
This is extracted from github.com/crystal-lang/pull/7093. This implements all the expected functions 128bit integer support.
|
how can I make this a draft? |
|
You can’t. Draft can only be created and be marked as ready. No worries |
|
@bcardiff can you take a look at this when you get a chance? |
But in #8283
So all the work we (as a community) put into compiler-rt go into:
That's why I question why we need to continue putting effort in these things. It's not that I don't find this PR useful in its own, but given the context where it could be applied it seems to provide very little value. |
|
Regarding the many specs, I don't think we need one spec per operation. We can put all specs inside a single |
|
I was doing a project with Int128 integers a while ago and found that this was uncompleted. |
|
@wontruefree What did you need Int128 in your project for? |
|
@asterite I was integrating with a cpp library that was using Int128. I was looking into slices and other technical solutions but in the end I discontinued the project. I picked this up because I thought it was interesting and I thought it would help us get to 1.0. |
|
Sorry for my interruption and discussion. If we can get this merged and support 32 bits and int128, I think this is the best result. Please go on! |
| test__muloti4(2097152_i128, Int128RT[4398046511103_i128].negate!, Int128RT[9223372036852678656_i128].negate!, 0) | ||
| test__muloti4(Int128RT[2097152_i128].negate!, Int128RT[4398046511103_i128].negate!, 9223372036852678656_i128, 0) | ||
|
|
||
| # test__muloti4(Int128RT[0x00000000000000B5_i64, 0x04F333F9DE5BE000_u64], Int128RT[0x0000000000000000_i64, 0x00B504F333F9DE5B_u64], Int128RT[0x7FFFFFFFFFFFF328_i64, 0xDF915DA296E8A000_u64], 0) |
There was a problem hiding this comment.
Why are there so many commented out tests?
There was a problem hiding this comment.
they are broken. The main problem is __udivmodti4 but it is hard to debug and I work on one failure at a time. I have gotten enough help from these PRs that I can close them and reopen them when I am closer if that helps.
There was a problem hiding this comment.
If this is WIP, then could you please indicate that in the title?
This is extracted from github.com//pull/7093.
This implements all the expected functions 128bit integer support.