waffle/wasm_tests/test4.wat

8 lines
278 B
Plaintext
Raw Normal View History

2024-01-20 10:37:12 -06:00
(module
(func $a (param i32) (param i32) (result i32)
(local $diff i32)
(local.set $diff (i32.const 1))
(if (i32.eqz (local.get 0)) (return (local.get 1)))
(return_call $a (i32.sub (local.get 0) (local.get $diff)) (i32.add (local.get 1) (local.get $diff)))
))