Closed greenhat closed 2 months ago
@bitwalker The checked variants were removed in https://github.com/0xPolygonMiden/miden-vm/pull/1142 Do we want to keep using the checked variants as intrinsics or switch to unchecked variants?
@greenhat We should replace the use of checked_*
with the unchecked variant, but prefix the call with a call to std::math::u64::u32assert4
to check the inputs as expected.
For arithmetic operations, we should do the same, but additionally use the overflowing variants for the actual op (rather than unchecked), and assert that no overflow occurs.
Fixed in #242
While working on #230 the assembler returned the following error: