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

Add an inverse of u32split instruction #1329

Open
hackaugusto opened this issue May 8, 2024 · 1 comment
Open

Add an inverse of u32split instruction #1329

hackaugusto opened this issue May 8, 2024 · 1 comment
Labels
assembly Related to Miden assembly instruction set Related to Miden VM instruction set

Comments

@hackaugusto
Copy link
Contributor

At the time we only a instruction to split a felt into two u32 called u32split, but we don't have the reverse operation to join two u32 to form a felt.

@hackaugusto hackaugusto added assembly Related to Miden assembly instruction set Related to Miden VM instruction set labels May 8, 2024
@hackaugusto
Copy link
Contributor Author

hackaugusto commented May 8, 2024

The instruction could be something like:

u32assert2 mul.4294967296 add

edit: actually, now that I think of it, the code above is not always correct, having the value 2**32 - 1 twice in the stack would pass the above check, but the addition would not fit in a felt. more thought needs to be put into the validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assembly Related to Miden assembly instruction set Related to Miden VM instruction set
Projects
None yet
Development

No branches or pull requests

1 participant