Add a Go backend#638
Conversation
|
Awesome!
If you know already that you won't use that value, just call it
We can use |
This is pretty tricky for us. I could make it happen, but it'd probably take a week or two of my working on it full time. Within each function, though, we don't reuse variable names. Could you get a post-processing phase to do this?
Nah, should be fine, we'd only use it to get 32x32 -> 32x32 multiplication, and also for 32-bit add-with-carry. |
Yeah, sounds like it will be easier to do in post-processing. |
e4fe573 to
72e4e7d
Compare
|
@FiloSottile Success! All of the Go files now build! |
766e8a4 to
f3641a3
Compare
|
Btw, I added in a post-processing phase that replaces unused identifiers with |
bcb702c to
7b9c560
Compare
This is one way of dealing with mit-plv#655 (changing from 17 limbs to 18 limbs).
9239872 to
48ab2d6
Compare
|
I am going to merge this. @FiloSottile feel free to open an issue if you want changes to this, or want this published as a Go package like the Rust code is, or whatever. |
Requested by @FiloSottile
The code does not fully work yet. Still remaining (at least):
bits.Mul64is unused (the other is used), etc. (@FiloSottile thoughts?)Invalid identifier in arithmetic expression Z.zselect(shows up into_bytesfor unsaturated solinas, and a bunch of other places as well). I'll dig into this when I get a chance.Z.combine_at_bitwidthin 32-bit outputs (maybe not necessary if Go only cares about cases when we have 64 bit integers available?) (@FiloSottile can we useuint64on 32-bit platforms?)