-
Notifications
You must be signed in to change notification settings - Fork 51
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
Error while decoding "0xa0680017fff8000" from Cairo1-produced CASM #184
Comments
It looks like the ap_update check might be redundant. |
It seems that ap update is permitted by jnz: Let's take this cairo1 program for example: fn f() -> bool {
let a: i32 = 1;
let b: i32 = 2;
let x = a < b;
return x;
}
We'll get this CASM for it:
Note the conditional jump with |
The cairo1 compiler generates jnz with ap++ for some range-check related code. To support this code in our assembler, the ap_change check should be removed. See the referenced issue for more context. Fixes #184
The cairo1 compiler generates jnz with ap++ for some range-check related code. To support this code in our assembler, the ap_change check should be removed. See the referenced issue for more context. Fixes #184
The cairo1 compiler generates jnz with ap++ for some range-check related code. To support this code in our assembler, the ap_change check should be removed. See the referenced issue for more context. Fixes #184
While decoding
0xa0680017fff8000
withassembler.DecodeInstruction
:It could be the case that CASM changed a bit since Cairo0 times or our assembler needs to relax some of its restrictions.
I'll take a look at the Cairo1 compiler code to know what this new combination of flags should signify.
This issue will probably resolved in the same context as #183, but I may send a separate PR just for this fix (if any).
thoth
disassembles it into an ordinary JNZ:The input bytecode looks like this (we only care about the first value in this array, so the output is truncated):
Instruction fields:
The text was updated successfully, but these errors were encountered: