nx_checked_arith_wrap.nx
buildroot/runtime/nx_checked_arith_wrap.nx
about
nx_checked_arith_wrap.nx -- LN1 wrap-by-intent witness (sibling of nx_checked_arith.nx).
__wrap_add / __wrap_sub / __wrap_mul reproduce the WRAPPED values under BOTH modes: under the
default they are exactly `+ - *`; under --chkarith they are exempt from the overflow check,
so a hash or ring counter written with them keeps running once the mode flips. Exit 0 iff all
three wrapped results are the expected ones. Separate file on purpose: a pre-LN1 compiler has
no such intrinsics, and the gate must be able to say WHICH tooth the old compiler fails.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 10 | func cw_pow62() -> i64 called by 1: cw_max |
| 15 | func cw_max() -> i64 |
| 19 | func cw_min() -> i64 called by 1: main |
| 24 | func cw_pow32() -> i64 called by 1: main |
| 29 | func cw_one() -> i64 { return 1 } called by 1: main |
| 30 | func cw_zero() -> i64 { return 0 } called by 1: main |
| 32 | func main() -> i64 |