tests
This commit is contained in:
parent
bd6ae8eb8d
commit
411267673d
3
test.sh
Normal file
3
test.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
wat2wasm --enable-tail-call $1 -o $1.wasm
|
||||
cargo run roundtrip -i $1.wasm -o $1.rt.wasm
|
||||
wasm2wat --enable-tail-call $1.rt.wasm
|
7
wasm_tests/test4.wat
Normal file
7
wasm_tests/test4.wat
Normal file
|
@ -0,0 +1,7 @@
|
|||
(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)))
|
||||
))
|
Loading…
Reference in a new issue