-
Notifications
You must be signed in to change notification settings - Fork 16
feat: replace wcp with assembly implementation #651
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
base: master
Are you sure you want to change the base?
feat: replace wcp with assembly implementation #651
Conversation
9474e22
to
2034915
Compare
2034915
to
772df62
Compare
if ARGUMENT_1==ARGUMENT_2 goto exit_1 | ||
goto exit_0 | ||
isz: | ||
if ARGUMENT_1==0 goto exit_1 |
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.
What happens if ARGUMENT_1
is not zero ?
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.
Then we fall through to exit_0
and we have RESULT=0
. An interesting question here is whether we should do anything with ARGUMENT_2
. In fact, in the current wcp
implementation the ISZERO
instruction is handled simply as an equality ARGUMENT_1 == ARGUMENT_2
under the assumption that ARGUMENT_2==0
whenever wcp(ISZERO,...)
is called.
if borrow!=0 goto exit_1 | ||
goto exit_0 | ||
slt: | ||
arg1sign,arg1bits = ARGUMENT_1 |
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.
Assembly just knows how to split due to the types ? That's nice
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.
Yes, that's the field agnosticity part. It uses the stuff from my report to make it work, adding carry lines and so forth.
Sorry, I misunderstood what you were saying. Yes, it can rely on the width of a register as the type of all registers is proven. Therefore, yeah, it can figure out how to split ARGUMENT_1
here based on the widths. In fact, if you provide an incorrect width for the left-hand side then it will complain. Also, it reads with the most significant bits on the left. So, in the above, arg1sign
gets bit 31
of ARGUMENT_1
and arg1bits
gets bits 30 .. 0
.
This replaces the WCP module with an assembly implementation. The assembly implementation implements identical functionality, but in a rather more compact form.
772df62
to
f6d3ce7
Compare
This replaces the WCP module with an assembly implementation. The assembly implementation implements identical functionality, but in a rather more compact form.
NOTE: should not be merged until corresponding
linea-tracer
PR is ready, and updated release ofgo-corset
is available.